From 6d36fa3839ba7a93cafb69da19d92e71339f4055 Mon Sep 17 00:00:00 2001 From: jacques Date: Wed, 24 Mar 2021 18:01:56 +0100 Subject: [PATCH] Change scheduleAlarm algorymth --- .../java/net/foucry/pilldroid/MedicamentListActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java index 23ed9bc..a6f99c0 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java @@ -375,12 +375,15 @@ public class MedicamentListActivity extends AppCompatActivity { if (today.before(dateAtNoon(today))) { // schedule date = today - calendar.setTimeInMillis(dateAtNoon(today).getTime()); + //calendar.setTimeInMillis(dateAtNoon(today).getTime()); + calendar.setTimeInMillis(today.getTime()); } else { // schedule date = tomorrow - calendar.setTimeInMillis(dateAtNoon(tomorow).getTime()); + calendar.setTimeInMillis(tomorow.getTime()); } + calendar.set(Calendar.HOUR_OF_DAY,12); + PendingIntent alarmIntent; Intent intent = new Intent(this, AlarmReceiver.class);