private void quitApplication() {
try {
ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> process = manager
.getRunningAppProcesses();
int pid = 0;
for (RunningAppProcessInfo runningAppProcessInfo : process) {
if (runningAppProcessInfo.processName
.equals(this.getPackageName())) {
pid = runningAppProcessInfo.pid;
break;
}
}
android.os.Process.killProcess(pid);
} catch (Exception e) {
Log.e(TAG, TAG + e);
}
}