Eric Bergman-Terrell's Blog

Previous Blog Post Android Programming Tip: Kill the Application Next Blog Post
May 18, 2011

Ordinarily one should let the OS decide when an Android app gets killed. But you can call ExitApplication.exit() to explicitly kill the running application:

public class ExitApplication {
public static void exit() {
int processID = android.os.Process.myPid();
android.os.Process.killProcess(processID);
}
}

Use Vault 3 for Android to keep track of your important notes when you're on the go. Thanks!

Keywords: Android, Kill Process, Process ID, Process

Reader Comments

Comment on this Blog Post

Recent Posts

Title Date
Vault 0.53 Released March 29, 2013
Vault 3 (Desktop Version) Updated March 23, 2013
EBTCalc for Android v. 1.12 - Now Runs on Phones and Smaller Tablets February 09, 2013
Vault 3 (PC Version) v. 0.50 Released January 07, 2013
Android Programming Tip: Recycle Views in Adapters December 07, 2012
Android Programming Tip: How to Embed EditText Views in a ListView (Don't!) December 07, 2012
EBTCalc for Android December 03, 2012