get RunningAppProcessInfo - Android App

Android examples for App:App Running

Description

get RunningAppProcessInfo

Demo Code


//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 List<RunningAppProcessInfo> getProgess(Context context) {
        return getManager(context).getRunningAppProcesses();
    }/*ww w  . ja  v  a2s.  c o m*/

    public static ActivityManager getManager(Context context) {
        return (ActivityManager) context
                .getSystemService(Context.ACTIVITY_SERVICE);
    }
}

Related Tutorials