Monitoring of Activities visibility
<p>Is it possible to determine the moment of switching of certain Activity from foreground to background and vice versa? 
This activity should run in the separate process.</p>

<p>I need to write the application that collects some statistics from using of big set of applications (app names read from configuration file). My application works as Service and should remember moments of switching of activities between foreground and background.
Set of applications is sufficiently big and most part of these applications will never work on certain phone.</p>
