Android: why did the Alarm notification stop after system reboot

前端 未结 1 748
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 11:46

I am developing an android application that should fire an alarm five times a day:
- the times in each day is not constant
- after the alarm is fired I will schedule th

1条回答
  •  盖世英雄少女心
    2021-02-10 12:13

    why did the Alarm notification stop after system reboot

    Because alarm schedules are cleared on a reboot. If you want to have your alarms pick up again after a reboot, you will need to implement a BroadcastReceiver that responds to the RECEIVE_BOOT_COMPLETED broadcast. The demo/ project in my WakefulIntentService repo demonstrates this.

    0 讨论(0)
提交回复
热议问题