I'm new to android, my requirement is to display active process
running with process start time.
I'm able to get the list of running process name/ID's with the below
code, but couldn't able to find how long process is running.
Here is my code sample.
List l = activityManager.getRunningAppProcesses();
Iterator i = l.iterator();
PackageManager pm = this.getPackageManager();
while(i.hasNext()) {
ActivityManager.RunningAppProcessInfo info =
(ActivityManager.RunningAppProcessInfo)(i.next());
try {
CharSequence c =
pm.getApplicationLabel(pm.getApplicationInfo(info.processName,
PackageManager.GET_META_DATA));
Log.w("LABEL :::", c.toString());
}catch(Exception e) {
//Name Not FOund Exception
}
Can you suggest me is there any class I need to look into it? It
would be great help if some one can help me with sample code. Thanks
in Advance.
Thanks & Regards
Vishnu.K
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en