Change scheduleAlarm algorymth

This commit is contained in:
jacques 2021-03-24 18:01:56 +01:00
parent e598d4827b
commit 6d36fa3839

View file

@ -375,12 +375,15 @@ public class MedicamentListActivity extends AppCompatActivity {
if (today.before(dateAtNoon(today))) { if (today.before(dateAtNoon(today))) {
// schedule date = today // schedule date = today
calendar.setTimeInMillis(dateAtNoon(today).getTime()); //calendar.setTimeInMillis(dateAtNoon(today).getTime());
calendar.setTimeInMillis(today.getTime());
} else { } else {
// schedule date = tomorrow // schedule date = tomorrow
calendar.setTimeInMillis(dateAtNoon(tomorow).getTime()); calendar.setTimeInMillis(tomorow.getTime());
} }
calendar.set(Calendar.HOUR_OF_DAY,12);
PendingIntent alarmIntent; PendingIntent alarmIntent;
Intent intent = new Intent(this, AlarmReceiver.class); Intent intent = new Intent(this, AlarmReceiver.class);