how to close android app completely

To Quit Application on Button click use this code :

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);

Try it..

To kill the complete app and remove it from Runningapp list kill the app through its pid(its nasty)… use this lines before above code.

int pid = android.os.Process.myPid();
android.os.Process.killProcess(pid);

Leave a Comment