I am sure this question has been asked number of times because I read a few. My client wants me to put a button into his app where users can click and exit. I have read this
If you want to exit from your application, use this code inside your button pressed event:
public void onBackPressed() { moveTaskToBack(true); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(1); }