I have a BroadcastReceiver
registered in the manifest which receives notifications from the AlarmManager
. This all works great while the app is running i.e. the onReceive()
method is being called.
However, if I force-stop the app so that I can test if the BroadcastReceiver
will still receive notifications from the AlarmManager
while not running, the onReceive()
method is never called.
Can force-stop not be used to test the AlarmManager
& receiver in this way? There seems to be some responses saying it won't work, and some saying it should.
If not, is there a way of testing this?
If your receiver is registered in your manifest, it should always work. Even if your app is force closed.
The problem might be the alarm. The alarms might be getting deleted, once your app force closes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With