Android examples for Android OS:Process
get Running Process Count
//package com.java2s; import java.util.List; import android.app.ActivityManager; import android.app.ActivityManager.RunningAppProcessInfo; import android.content.Context; public class Main { public static int getRunningPocessCount(Context context) { List<RunningAppProcessInfo> runningAppProcessInfos = getManager( context).getRunningAppProcesses(); int count = runningAppProcessInfos.size(); return count; }//from ww w .ja va2 s . co m public static ActivityManager getManager(Context context) { return (ActivityManager) context .getSystemService(Context.ACTIVITY_SERVICE); } }