Java tutorial
//package com.java2s; //License from project: Apache License import java.util.List; import android.app.ActivityManager; import android.app.ActivityManager.RunningAppProcessInfo; import android.content.Context; public class Main { public static List<RunningAppProcessInfo> getRunningProcesses(Context ctx) { ActivityManager am = (ActivityManager) ctx.getSystemService(Context.ACTIVITY_SERVICE); return am.getRunningAppProcesses(); } }