I can run an application in background but i want to know how many applications are running in the background.Like in some mobile while pressing the center button a list of currently running applications are displayed.Is this is possible in android.If possible means give some code snippets and steps to achieve this.
views:
488answers:
1
+3
A:
The Dev Tools application (installed in emulators) shows a list of running processes by obtaining an instance of ActivityManager
:
ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> l = am.getRunningAppProcesses();
Josef
2009-06-30 08:49:33
And how to find Linux kernel related process? getRunningProcesses() only get those Apps running on android framework.
XC
2010-04-29 02:39:47
you can run `ps`, just like on any other linux system
Josef
2010-04-29 06:51:35