1

I'm having a problem with a very simple app that shows a notification once a day. To do that I am simply doing this:

    PendingIntent pendingIntent = [pending Intent to a Service]
    alarmManager.setInexactRepeating(AlarmManager.RTC, DateTimeUtil.getTomorrowAtEight(), AlarmManager.INTERVAL_DAY, pendingIntent);

This works for a few days and then stops working, on a device running Android 6.0 (LG G4).

adb -d shell dumpsys alarm shows that indeed my alarm is not in the list of "Pending alarm batches".

I don't have this problem on a device running Android 5.1 (Samsung S4).

I'm guessing this has something to do with Doze Mode or App Stand by, but as far as I can tell (correct me if I'm wrong), alarms can be delayed, which is fine for my use case, but are not supposed to be cancelled!

Ideas?

BoD
  • 10,838
  • 6
  • 63
  • 59

0 Answers0