Getting the Recently running application info

Put your problem here if it does not fit any of the other categories.

Getting the Recently running application info

Postby arvchak » Mon Jan 12, 2009 5:30 am

Hi,

I have a use case where i have to get a info on the recently used app, I have explored the API where I found Activity Manager can do that for me with the help of getrecenttasks().My problem goes here

Well i am not able find way to intialize my ActivityManager object it does not even seem to be a static class.kindly help me on this



Thank You
User avatar
arvchak
Developer
Developer
 
Posts: 37
Joined: Thu Dec 11, 2008 7:38 am

Top

Postby mek » Mon Jan 12, 2009 6:44 am

Try this
ActivityManager myActivityManager = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
mek
Freshman
Freshman
 
Posts: 3
Joined: Mon Jan 12, 2009 6:36 am
Location: Almaty, KZ

Postby arvchak » Mon Jan 12, 2009 6:46 am

hi mek,

Thanks it works.
User avatar
arvchak
Developer
Developer
 
Posts: 37
Joined: Thu Dec 11, 2008 7:38 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests