1

I have a service that runs in the background.

I want this service to see which app the user has in the foreground.

I can do it with the service is running every second and checks which app is in the foreground this will kill the battery.

Are there an handler or a broadcast that can start the service when the app is changed in the foreground?

I can see that the activitymanager writes to the logcat(in eclipse) when I change apps.

  • http://stackoverflow.com/questions/3290936/android-detect-when-other-apps-are-launched Check this thread..could be useful – Mukund Samant Oct 03 '13 at 09:51

0 Answers0