I want to quit application in Android. Just put a "quit" button, which kills my app.
I know I shouldn't do this. I know that this is not the philosophy of the OS.
If you know how it can be done, pls share.
In the app, I have many opened activities, so "finish()" will not do the job.
Thank you for your information in advance. Danail
Way One
android.os.Process.killProcess(android.os.Process.myPid())
Way Two
System.exit(0);
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