BroadcastReceiver registered in the manifest which receives notifications from the
AlarmManager. This all works great while the app is running i.e. the
onReceive() se está llamando al método.
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() nunca se llama al método.
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?
preguntado el 22 de mayo de 12 a las 18:05
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.
May this could be your device problem. In Xiomi, Oppo, Vivo, honor, and Letv mobiles user has to give an autostart permission to the application and for this, you should ask the user to enable this manually you cant done it programmatically