Open uzairshahzad082 opened 1 year ago
It is measured in milliseconds.
https://developer.android.com/reference/android/app/usage/UsageStats#getTotalTimeInForeground()
Ok but it tells the total time the app uses, not just foreground. Because when I see it on Google Digital wellbeing and parental controls. It tells me correct screen time for each app. But when I check that from this package, it is much greater. Is there any solution?
I am also facing this. The 'totalTimeInForeground' method is returning time which is much greater than the actual time the app is used in the foreground, found this when I compared it with other apps.
I am using this package to get the duration, an app remains in foreground, but it is returning a strange number which is entirely different.