开发者

Android notification after an application was closed

开发者 https://www.devze.com 2023-04-04 10:38 出处:网络
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 t

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号