public void AppExit(Context context) {
try {
stopService(keepSessinService);
finishAllActivity();
ActivityManager activityMgr = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVICE);
activityMgr.killBackgroundProcesses(context.getPackageName());
System.exit(0);//这句是重点,Runtime.getRuntime().exit(0);
} catch (Exception e) {
}
}
try {
stopService(keepSessinService);
finishAllActivity();
ActivityManager activityMgr = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVICE);
activityMgr.killBackgroundProcesses(context.getPackageName());
System.exit(0);//这句是重点,Runtime.getRuntime().exit(0);
} catch (Exception e) {
}
}