Detect other apps being launched and closed by external Service in Android

倾然丶 夕夏残阳落幕 提交于 2019-12-08 01:04:28

问题


I am currently trying to monitor applications being launched and closed under Android. I need to create Android Service app that accumulate statistics (Time, AppName) about starting and terminating selected apps.

I clear understand Processes and Application Lifecycle https://developer.android.com/guide/components/activities/process-lifecycle.html

And I know how to detect running app How can I check if an app running on Android?

Anyway are there any Android events to sucbscribe to listen for it?

Is it possible to do at least for MainActivity of the app?

Should monitored app have implemented some kind of interprocess Broadcast Messenger?

Thank you!

来源:https://stackoverflow.com/questions/48699462/detect-other-apps-being-launched-and-closed-by-external-service-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!