I want to get the Usage time of all those applications which i have used today.
As i am getting the those details by dialing *#*#4636#*#*
.
But i want these details programmatically in android.
please help me out in this.
we can see how these play store apps are able to show the usage Statistics
From Android 5.0 we can use
android.app.usage.usageStats
to get the total time an app has been used by accessinggetTotalTimeInForeground()
. For more details, refer here