I want to kill all running applications in android .so for this task , i implemented following code. But it is not working .App still remains in running.
ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
for (RunningAppProcessInfo service : manager.getRunningAppProcesses()) {
Log.i("process name " , service.processName);
android.os.Process.killProcess(service.pid);
}
So where does i make mistake in code ?
Is there any help ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…