Running/Start time of android application/process?

by vishnu kumarraju » Sat, 12 Feb 2011 05:51:09 GMT


Sponsored Links
 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

-- 



Other Threads

1. How do I transfer my .adk to the \system\app directory?

I built a simple hello world application and I have the .adk file.  i
 transfered the .adk file onto my g1 phone.   I see it in the top-
level directory, but how can I execute it now?  I think I need to copy
it to  the system\app directory on the phone (where I see the rest of
the .adk files)... However, I dont know how to copy it there.  My
android file manager wont copy/paste it there.  How do I get my app
to  fireup on the g1 phone?

--~--~---------~--~----~------------~-------~--~----~

2. How to force portrait mode?

Hello,

        I need to force the portrait layout on our app at all times, meaning  
when the phone is rotated to landscape orientation the view should  
appear sideways, whether or not the keyboard is out.  How to I enforce  
this?

        BTW - I understand why this is undesirable but I'm not the UI  
designer nor the person that approved the layout.  I'm a humble coder  
so if you feel the urge to ignore the above question and address the  
bad design please move along.  I already know.

Thank you!

Brian


--~--~---------~--~----~------------~-------~--~----~

3. Setting "Use by default for this action" option crashes when attempting to replace a standard application

4. can not create Surface and ISurface successfully

5. posibility of self-acting sms/ mms an phone calls

6. Why isn't this layout file working?

7. Android Market's "Publish" Button does nothing