How to kill running application in android
===

I am writing a application which can kill other running application. For this I am using following code

int pid = android.os.Process.getUidForName("com.sample.mango");
                 android.os.Process.killProcess(pid);
   	    		 Log.e("killed",process.processName);

I am able to display all running application. But the above two line of code is not killing the process of application(com.sample.mango). Also I can see several task killing app in the market. 

 So my question is -- Is it possible to kill running application from other application?

If yes then what is way to kill? (why the above code is not working)

