I would like to check the top running application, I mean the one on the top, which the user is using. Is it possible to do that with BroadcastReceiver
or it can only be done with Service
implementing inside it a Handler
?
Asked
Active
Viewed 207 times
1

halfer
- 19,824
- 17
- 99
- 186

ARMAGEDDON
- 939
- 3
- 11
- 23
-
you should use service for that – Jun 18 '13 at 03:52
-
Look at this link. Is this what you want: http://stackoverflow.com/questions/2166961/determining-the-current-foreground-application-from-a-background-task-or-service – vkinra Jun 18 '13 at 04:11
-
Look at this link. Is this what you want: http://stackoverflow.com/questions/2166961/determining-the-current-foreground-application-from-a-background-task-or-service – vkinra Jun 18 '13 at 04:12
1 Answers
0
ActivityManager has some method just like getRunningAppProcesses or getRecentTasks can be help.

tianwei
- 1,859
- 1
- 15
- 24