This question has been answered elsewhere but all solutions use ".getRunningTask()", which has been depreciated in the most recent API. I am trying to make an app that allows people to monitor their phone use and need to know when an app come to the foreground and when the foreground app changes.
Asked
Active
Viewed 237 times
1
-
Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on [so]. See "[Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts). – John Saunders Jan 12 '15 at 18:29
1 Answers
0
I think if you have a look at this answer you will find what you are looking for: https://stackoverflow.com/a/27304318/1173391