I need to track usage time of all installed applications using java in Android OS. 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?
First of all, you can use android.app.ActivityManager to retrieve phone statuses and running processes. A great example of this can be found here,
Sample Java code for android.app.ActivityManager
You can also monitor foreground activity to determine what tasks are being performed. Example here
Android
, . ,
Android-