Java Android tracking usage time installation app
•
Android
I need to track the usage time of all installed applications in the Android operating system. For example, this application is very similar: https://play.google.com/store/apps/details?id=com.agrvaibhav.AppUsageTracking
Is there any way to do this?
resolvent:
First, you can use android.app.activitymanager to retrieve mobile phone statues and running processes. A good example of this can be found here,
Java Code Examples for android.app.ActivityManager
You can also monitor foreground activities to determine running tasks,
how do android monitor usage applications work
Finally, you can create your own service to detect each running process and its usage. You can find a complete example of this process here,
App to monitor other apps on android
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码