how to force close the currently runnning application in android
<p>i am trying to find out the list of processes which is runnning in the device. 
after that i want to force close all the process except my current application.
I tried using this below code . Its listing out the processed but its not killing the processes .</p>

<pre><code>ActivityManager manager = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);

 List&lt;RunningAppProcessInfo&gt; process = manager.getRunningAppProcesses();  




  for (int i = 1 ;i&lt; process.size();i++)

  {
    int pid = process.get(i).pid;            

    System.out.println("Task " + process.get(i).processName);  

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

<p>This above code only i tried to kill the processes. once after the killprocess called i again called the getRunningAppProcess() to check the process are killed or not. still its showing all the processes.</p>

<p>Please any one help me</p>
