I tried System.Exit(0), but is not that i need;
I'm trying to safely destroy android application and clear it from memory,
can i make a button to exit android application and clear all application from memory ?
Calling System.exit() is a bad idea. You can simply call finish() on all the activities you need to kill. Here's a good solution to do this: https://stackoverflow.com/a/5453228/1369222
The basic idea is to add a broadcast receiver to every activity of your app that will finish itself when a particular "kill activities" intent is fired.
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