PHP
·
发表于 5年以前
·
阅读量:8282
ActivityManager mActivityManager = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> mRunningProcess = mActivityManager.getRunningAppProcesses(); int i = 1; for (ActivityManager.RunningAppProcessInfo amProcess : mRunningProcess) { Log.e("homer Application", (i++) + " PID = " + amProcess.pid + "; processName = " + amProcess.processName); }