Is there anyway to detect any applications running in foreground? I wanted to perform some actions whenever the user in the home screen. If the user is in Email or other activity, I don't want to trigger those actions.
Asked
Active
Viewed 142 times
2
-
Clarify your question - you stated *I wanted to perform some actions...* yet the closing statement *I don't want to trigger those actions* appears contradictory... – t0mm13b Jan 22 '13 at 16:11
-
1[this may help you](http://stackoverflow.com/questions/3393908/how-to-get-any-identifier-of-the-topmost-activity) – Leonidos Jan 22 '13 at 16:14