I have created an Android application. I make it my default Activity
on starting it.
My problem is that if I hard reboot or if the battery goes down, the device shuts down and my device keeps on starting that Activity
and I am stuck into a boot loop.
How can I solve this problem?
Any help appreciated.
Well the solution is simple , make a BroadcastReceiver for a on Boot up , and a flag somewhere like ForceClosed set to TRUE, if application terminated without any error then set the flag to FALSE .
On receiving the Boot Broadcast , check if ForceClosed is TRUE , if yes , do watever you want , and then set it back to FALSE .
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