[BUG]: Incorrect screen time
I've noticed that my screen time is unusually high. On 00:01 midnight, I have over an hour of screen time, which doesn't seem logical.
Here's an example from just now: Digital Wellbeing is displaying 55 minutes, which seems realistic, while OLauncher is indicating 3 hours and 12 minutes.
Ya mine says 7 hours when it's just past midnight.
I think its calculating the past 24 hours not resetting at midnight.
That's stupid, I guess you are right!
I have the same problem. Samsung galaxy S23 with Android 14
To be honest, since it probably only counts the last 24 hours, it's a somewhat useless indicator. I'm spending time on my phone, yet the time displayed is either stagnant or decreasing. 💀
https://github.com/tanujnotes/Olauncher/blob/fbcc721e9c97368c5b621270cc4e183920febea2/app/src/main/java/app/olauncher/MainViewModel.kt#L255-L273
It seems like the intention was to show the screen time from the start of the current day until 24h after. Which seems correct. But there must be a bug somewhere. Might also be time zone related, but that's just a wild guess.
https://github.com/tanujnotes/Olauncher/blob/fbcc721e9c97368c5b621270cc4e183920febea2/app/src/main/java/app/olauncher/MainViewModel.kt#L255-L273
It seems like the intention was to show the screen time from the start of the current day until 24h after. Which seems correct. But there must be a bug somewhere. Might also be time zone related, but that's just a wild guess.
Ya that is how it is meant to work but some reason it doesn't take the current time even changing the 0 for hour to 9 for 9am it still displays the same data so the hour is not affecting anything. I have been playing with that part of the code for 3 days now and can't figure out why the hour isn't effected
It has something to do with the UTC timezone but I haven't been able to figure out a solution. The response Android provides for the screen time is all over the place. I tried different screen time apps and they all show different values, although not as wrong as Olauncher. Working on it.
It has something to do with the UTC timezone but I haven't been able to figure out a solution. The response Android provides for the screen time is all over the place. I tried different screen time apps and they all show different values, although not as wrong as Olauncher. Working on it.
Take a look at usageDirect they seem to do a pretty good job with it.
Hello, Having the same issue here on a fairphone.
Hello, Having the same issue here on a fairphone.
FairPhone 5 Crew :)
@ArchUsr64 sadly that doesn't fix the issue at all.
@ArchUsr64 sadly that doesn't fix the issue at all.
Yeah, it's very strange. It worked on my phone for a few days and then broke again. Likely an issue with the underlying android API.
ya i have spent hours trying to work out why it is not working and even tried to look at how usagedirect does it but no luck sadly :(
I found a fix by filtering today’s values.
However, it also counts the time spent in the launcher, so the time differs a little bit compared to the Digital Wellbeing time.
However, it also counts the time spent in the launcher, so the time differs a little bit compared to the Digital Wellbeing time.
I tried this along with a blacklist of apps using the code below but it still shows 2 hours where as Digital Wellbeing is showing 3 mins and the old way shows 12 mins
private fun parseBlacklistXML(context: Context): List<String> {
val packageNames = mutableListOf<String>()
// Obtain an XmlPullParser for the blacklist.xml file
context.resources.getXml(R.xml.blacklist).use { parser ->
while (parser.eventType != XmlPullParser.END_DOCUMENT) {
if (parser.eventType == XmlPullParser.START_TAG && parser.name == "app") {
val packageName = parser.getAttributeValue(null, "packageName")
packageNames.add(packageName)
}
parser.next()
}
}
return packageNames
}
| Old Way | Your Way |
|---|---|
Interesting. After filtering out the launcher app, I have a difference of ±5 minutes. I will test the behavior after midnight.
I will give it a test tomorrow too and see if them new changes fix it.
For reference
Try this: https://github.com/tanujnotes/Olauncher/releases/tag/v5.2.28
Hi everybody, i know that works was done on screen time - thank you ! - but since Olauncher update 5.3.2 (today) the screen time is worse than before in my case.
23 min is correct (well-being calculation) 14h21 is of course wrong (14h00 more !)
Is there a problem with time settings, time zone (UTC -4, Atlantic time) ?
Interesting. Can you please share your weekly wellbeing stats?
The new screen time calculation method seems to be failing on Samsung devices. Fixing it.
Yesterday at midnight time screen reset to 0. This morning time screen seems OK. I don't understand, It's beyond my skills. There is a difference of a few minutes compared to well being calculation. Thank you.
Just chiming in to say that there is still a bug for my screen time display on a Google Pixel 8.
This is still an issue for me as well. I'm on a Samsung Galaxy S25 Ultra.
It started to become an issue in the last weeks for me too.. I now often wake up with Screen Time values way higher than the hours of the day elapsed (with actual 0 min). I also reach 25+hours of screen time. A couple weeks ago, the values were identical to the Digital Well Being App on my S24.
Same issue here on a Huawei At 8:05am - OLauncher is showing 8h 52m Actual = 7 mins Last 7 Days: 7 min, 56 min, 1h 10m, 2h 21m, 3h 24m, 56m, 3h 52m
Also experiencing this issue on Pixel 6.
Would be nice if there was an option to just hide the amount, if it's not functioning... It would also be nice to be able to blacklist some apps, like navigation.
I guess there is no API inside Android to request this value, instead of calculating it yourself?
This is a known issue with no known solution at the moment. If anyone can help, that'd be great. Thank you.