No, Android will not kill the planned alarms, and they were executed as planned if the application was not replaced or the device rebooted. Use the broadcast receivers for these events to carry the alarms. There is no way to prevent Force Stop, as it completely destroys all components and threads of the application.
It depends on what Alarm Manager does. If it sends a broadcast, the receiver limit is 10 seconds.
If it starts an Activity, Service, or Intent Service, there are no restrictions. For Activity and Services, you must terminate or stop it for Intent Services until the process ends. Keep in mind that you cannot have another thread inside the Intent Service, and you are limited by the code inside OnHandleIntent.
You should also consider the status of the device. If he is sleeping and you are using Wake Up receivers, you will not need tracking lock, but others. The device does not take long for the device to fall asleep again.
Do not waste system resources in the service, because Alarm Manager does what you want.
Ali
source share