How to kill all running applications in android?
<p>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.</p>

<pre><code>ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
    for (RunningAppProcessInfo service : manager.getRunningAppProcesses()) {
    Log.i("process name " , service.processName);

    android.os.Process.killProcess(service.pid);
    }
</code></pre>

<p>So where does i make mistake in code ?
Is there any help ?</p>
