How to shutdown an android application? I don't find a shutdown command to application object. I want to shutdown and restart in case of some critical error.
If there is some kind of "critical error", then you should should deal with it in your code rather then trying to restart the application.
You cannot shutdown an application in Android, however once all of your Activities are closed (which you can programatically do with the Activity.finish() method), then your application is considered to be closed.
You don't need to shutdown an application, Android takes care of this.
The application is on the background and she is "freezed". If the system, or another application needs memory or CPU, Android will choose a background application to stop.
But everything is automatic. It's the Android's power !
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