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();

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
Android Programming Tip: How to Target Localhost from the Android Browser September 1, 2015
This Website is now Powered by Node.js and Express August 27, 2015
Node.js Programming Tip: Run Shell Commands and Capture Output August 27, 2015
Node.js Programming Tip: Use Async to Organize Concurrent (and Serial) Tasks August 26, 2015
Node.js Programming Tip: How to implement WHOIS August 24, 2015
Node.js Programming Tip: How to Encode and Decode Base64 Text August 21, 2015
Node.js / Express Programming Tip: How to determine IP address from an HTTP request August 20, 2015