How to kill a running process in Android?« Back to Previous Page

Here is a snippet that kills all the running processes (except system ones which application can't kill)

In your Activity put:

ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
List<RunningAppProcessInfo> runningProcesses = manager.getRunningAppProcesses();
if (RunningAppProcessInfo p: runningProcesses) {

In your AndroidManifest.xml file put
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
Does anyone know other way to kill a background process?
Posted by itcuties (Questions:2, Answers:18)
Asked on July 18, 2013 5:39 am
Category: Android
No account?

It's FREE!

Like what you have found?

... and keep us going