Do alarms queued with IALARMMGR_SetAlarm() survive a device reboot? | developer.brewmp.com Do alarms queued with IALARMMGR_SetAlarm() survive a device reboot? | developer.brewmp.com

Developer

Do alarms queued with IALARMMGR_SetAlarm() survive a device reboot?

Forums:

If I queue an alarm with IALARMMGR_SetAlarm() then the device is rebooted, will the alarm still persist and subsequently send my application (if its not running) an EVT_ALARM?

 

This seems to be happening on the simulator but I'm not in a position to try running the code on hardware.

If it does persist, then how does it work i.e. where does the OS store the information relating to the alarm time and app?  Presumably this storage area cannot be erased on a device reboot, so on what circumstances, if any, is it erased?

Yes it would, even if an alarm’s expiration time passes while the device is turned off, the alarm notification is generated the next time the device is turned on.
The alarms are stored in BREW database and continuously checked for alarm expirations while the BREW-enabled device is turned on.

Yes it would, even if an alarm’s expiration time passes while the device is turned off, the alarm notification is generated the next time the device is turned on.
The alarms are stored in BREW database and continuously checked for alarm expirations while the BREW-enabled device is turned on.

Would the alarms ever get erased? i.e if you take the batteries out then put them back in before turning back on for example?

Would the alarms ever get erased? i.e if you take the batteries out then put them back in before turning back on for example?

No, As Alrarm is stored in BREW database, it will work once you insert battery again even when time is expired.

No, As Alrarm is stored in BREW database, it will work once you insert battery again even when time is expired.

Is there a way of deleting these alarms on the emulator between runs?
(During debugging, if an alarm gets scheduled, then the next time I launch the simulator I might not want the alarm to trigger, therefore is there a way to i.e. delete the brew database for example?)

Is there a way of deleting these alarms on the emulator between runs?
(During debugging, if an alarm gets scheduled, then the next time I launch the simulator I might not want the alarm to trigger, therefore is there a way to i.e. delete the brew database for example?)

No, but you can cancel it using IALARMMGR_CancelAlarm()

No, but you can cancel it using IALARMMGR_CancelAlarm()