3

Backgroud

I am using AlarmManager and JobScheduler(=> API 21) to generate Notification at 11 am in the morning.

Issue

Suppose my device is turned off at 11 am. So Alarm will not go off and Notification is not generated for today. Now, when it will reboot. the alarm is set again for 11 am of next day using BroadCastReceiver on action.BOOT_COMPLETED.

I have explored Job Scheduler a bit and setPeriodic(ms) function is used to set a periodic job but does not allow to schedule a job at specific time.
(Google -> define schedule -> arrange or plan (an event) to take place at a particular time.).

Any pointer to workarounds to this use case. I would prefer native solution, though.

omer
  • 175
  • 1
  • 3
  • 17
  • You can find the answer here: https://stackoverflow.com/a/43242338/847235 – intrepidis Mar 11 '18 at 07:37
  • Possible duplicate of [Android start running JobScheduler at specific time](https://stackoverflow.com/questions/38301351/android-start-running-jobscheduler-at-specific-time) – intrepidis Mar 11 '18 at 07:39

0 Answers0