Eric Bergman-Terrell's Blog

Android Programming Tip: Kill the Application
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

TitleDate
EBTCalc (Android) Version 1.53 is now availableMay 19, 2024
Vault 3 Security EnhancementsOctober 24, 2023
Vault 3 is now available for Apple OSX M2 Mac Computers!September 18, 2023
Vault (for Desktop) Version 0.77 ReleasedMarch 26, 2023
EBTCalc (Android) Version 1.44 is now availableOctober 12, 2021
Vault (Desktop) Version 0.72 ReleasedOctober 6, 2021
EBT Compass is Now Available for Android DevicesJune 2, 2021