Code example for ActivityManager

Methods: killBackgroundProcesses

0
	 */ 
	public void exit() { 
 
		if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.ECLAIR_MR1) {
			ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
			am.killBackgroundProcesses(getPackageName());
 
		} else { 
			android.os.Process.killProcess(android.os.Process.myPid());
		} 
 
	} 
	 
	/** 
	 * 获得Context 
	 * @return 
	 */ 
	public static Context getContext(){
		return mApplication.getApplicationContext();
	} 
Stop searching for code, let great code find you!  Add Codota to your java IDE