Is there a way I can be notified of an application launch and termination in Android? I mean, more like subscribing to the Activity Manager and then determining which applications have been started and stopped...
+1
A:
My first instinct is to point you towards the BroadcastReceiver class, but checking the list of Intent flags available to listen for, I'm not seeing anything dealing with application startup/shutdown. I guess the best thing to do is start with this and see if there's some sort of acrobatics you can do that I'm missing in my quick glance.
MattC
2009-11-16 22:03:01
But isn't that assuming that the application is actually sending a broadcast of its launch (or to that matter, any of its state) or am I totally off the track?
Legend
2009-11-16 22:35:03
Well the system sends broadcasts for certain events too. My hope is that there's some sort of broadcast for app startup/shutdown and I'm just missing it.
MattC
2009-11-17 03:12:10
Thank You. I will investigate this matter further.
Legend
2009-11-20 00:34:46