I've been looking around and I can't find any way to get a notification when an application was closed by the user in Android. I know, you'll say onPause() or onStop(), but what if I can't touch the Android application? This is what I need: If the user closes开发者_如何学编程 the Browser application, I want to be notified about that event. Is there any way to do this in Android without actually modifying the Browser app?
Hate the be the bearer of bad news but there is really no way to do this unless you write something by hand. One way would be to use something like a task manager and sniff all the running applications and then see if your browser is running. Then if it is running send a message out when it closes. There really is no easy way to do this as you want information on system root/level processes.
精彩评论