tahaak67 / Farhan

An Android app to help you with phone addiction.
Apache License 2.0
131 stars 7 forks source link

Wrong reported usage for Farhan #18

Open bagnacauda opened 1 year ago

bagnacauda commented 1 year ago

Just installed the app, it reports 50+ minutes of usage. Screenshot_20230228-105713_Farhan

tahaak67 commented 1 year ago

Thanks for reporting, since this happened yesterday can you go back to yesterday's usage and check if the usage for Farhan is still at 56m?

bagnacauda commented 1 year ago

Yesterday is now at 2 minutes, but today is at 40+(which is wrong): Screenshot 20230301-074223_Farhan

Wjxfi commented 1 year ago

The same thing happened to me

I opened the app and it showed 56 minutes

tahaak67 commented 1 year ago

bruh every time i see issue like this it makes me regret adding this feature 😂 (bad joke), since my test for calculating the duration is passing im guessing that the Android API is returning invalid data? i can't confirm yet since it didn't happen on devices i tested on. I'll try my best to look into it.

Warden20 commented 8 months ago

It is still happening

hollisticated-horse commented 8 months ago

Hello, same problem here.

@tahaak67 How do you calculate farhan usage time ? from the Android API ? maybe remove that amount from the data and have the app count itself the time spent on it ?

I have the proprietary app ActionDash running along side Farhan, and the numbers ActionDash provides are very different: 2h7min (with one to two minutes attributed to Farhan) from ActionDash vs 4h15min from Farhan. So Farhan usage time count is wrong, so is two other app as well, one of which is my launcher Quickstep (stock AOSP shell/launcher). Seems that ActionDash removes the launcher from the time count (my guess), where in Farhan I can see 54min from Quickstep.

tahaak67 commented 8 months ago

Hello, same problem here.

@tahaak67 How do you calculate farhan usage time ? from the Android API ? maybe remove that amount from the data and have the app count itself the time spent on it ?

Farhan relies on events provided by the android api to calculate and display usage time, during my testing the durations displayed per app by Farhan were identical to thoes provided by digital wellbeing i even wrote test cases for the calculation method and it passed no matter what i provide as input. idk maybe there is something wrong with my implementation that i can't see?. there was a time when i stayed on a game ideling for a while and digital wellbing didn't display any usage for that game while Farhan displayed the currect duration.

this needs further investigation and will take time as i don't have much time to work on it atm

tahaak67 commented 2 months ago

does this still occur after the last update?

tomaszk8266 commented 2 months ago

For me, it still occurs.

hle-cer commented 2 months ago

yes its still wrong for me. Screenshot_20240709-204402 how is this even possible 🤣🤣 I use graphene os without digital wellbeing. idk if that has something to do with it. It seems to be reporting the time when app was running in background as screen time 🫤