I have created an alarm application in android.The problem is, when the phone reboots the alarm which was set already for previous date is showing. How to cancel the alarms which were set before the current date.
Asked
Active
Viewed 283 times
1 Answers
1
what are you using to set the alarm ? If you are using AlarManager to do so then try AlarmManager.cancel();

pankajagarwal
- 13,462
- 14
- 54
- 65
-
Alarms set via AlarmManager do not survive a reboot. – Kuffs Dec 05 '11 at 12:03
-
The problem is when i reboot the emulator my alarms which was set, wont appear anymore.Is there any solution for persisting the alarm after rebooting the phone/emulator. – John Dec 06 '11 at 06:39
-
try setting a brodcast receiver for the broadcast ACTION_BOOT_COMPLETED, and in this receiver set the alarms once again. As mentioned by Kuffs, alarms donot survive reboot, so you need to set them again after the device boot is complete – pankajagarwal Dec 06 '11 at 09:19