Reminder
I am developing a reminder app. I am generating notifications using the notification manager class when the time crosses. But if my mobile phone is turned off, I cannot see these notifications. Even when I turn it on again.
Even if I turn it off and on again, I think the pending intents will be destroyed and no notification will be generated.
How can I get it when the phone is turned on again?
a source to share
Take a look at AlarmManager
:
From http://developer.android.com/reference/android/app/AlarmManager.html :
This class provides access to system signaling services. This allows you to schedule the launch of your application at some point in the future. When the alarm goes off, the intent that was registered for it is broadcast by the system, automatically launching the target application if it is not already running. Registered alarms are saved while the device is sleeping (and can wake up the device if necessary if they go off during this time) , but will be cleared if it is turned off and rebooted.
a source to share