How to receive notifications of activity / task changes in Android

I am building a system status recorder. I would like to receive notifications that any activity / task is brought to the end of the stack and becomes visible to the user (and not just the one I wrote).

ActivityManager allows you to define what's on top: http://developer.android.com/reference/android/app/ActivityManager.html

However, this requires that I often conduct a survey to recount that it actually spends a lot of resources. Is there a way to get an event / callback / notification when an action changes?

** edit ** To be clear - I want to be notified when any activity becomes active.

+7
source share
1 answer

onResume () is called when the activity goes live.

0
source

All Articles