public class ProcessManager
extends java.lang.Object
Note: Every method in this class should not be executed on the main thread.
Modifier and Type | Class and Description |
---|---|
static class |
ProcessManager.Filter
Get a list of running processes based on name, pid, ppid, or other conditions.
|
static class |
ProcessManager.ProcessComparator
Comparator to list processes by name
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<AndroidAppProcess> |
getRunningAppProcesses() |
static java.util.List<android.app.ActivityManager.RunningAppProcessInfo> |
getRunningAppProcessInfo(android.content.Context ctx)
Returns a list of application processes that are running on the device.
|
static java.util.List<AndroidAppProcess> |
getRunningForegroundApps(android.content.Context ctx)
Get a list of user apps running in the foreground.
|
static java.util.List<AndroidProcess> |
getRunningProcesses() |
static boolean |
isMyProcessInTheForeground() |
public static java.util.List<AndroidProcess> getRunningProcesses()
public static java.util.List<AndroidAppProcess> getRunningAppProcesses()
public static java.util.List<AndroidAppProcess> getRunningForegroundApps(android.content.Context ctx)
ctx
- the application contextpublic static boolean isMyProcessInTheForeground()
true
if this process is in the foreground.public static java.util.List<android.app.ActivityManager.RunningAppProcessInfo> getRunningAppProcessInfo(android.content.Context ctx)