问题
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