-1

I want to run a service (push notification) in a specific time every day even if phone is in a doze mode l. Using alarm manager with method of setExactAndAllowWhileIdle() has two issues first it just support sdk 23 and upper, second it cannot be repeated for every day

  • About the repeating everyday, why not just re-call setExactAndAllowWhileIdle() after it has run its course for the day? – Martheen Jun 02 '20 at 03:12

1 Answers1

0

By the way, you should reschedule new alarm for next day after the time for this one comes.

And also you should note, that even this method of AlarmManager could be blocked in Doze mode.

mrcrambo
  • 484
  • 2
  • 5
  • 13