AlarmManager to send a notification
I want to put an alarm manager in my app that will trigger a notification once every 3 days or so that will let them know about the paid version of the app. But dosent the alarm manager get reset when the phone is turned off? so how do I keep tract of when the last time it was triggered if the phone was restarted?
开发者_如何学Cor would it be easier to just trigger it on certain days?
In the past I have written a value into the app's preferences every time the alarm is triggered. You can then register a BOOT_COMPLETED listener so when the phone is turned on and off the alarm manager will be reset based on the saved preference value.
精彩评论