astashov / liftosaur

Weightlifting tracker app for coders
https://www.liftosaur.com
GNU Affero General Public License v3.0
243 stars 32 forks source link

[android] Timer does not notify while in the background #66

Closed CurtisTD closed 3 months ago

CurtisTD commented 1 year ago

Hey there,

Recently bought premium to get the notification support in the background for the timer. Not sure why but when my screen is off or I'm in another app, the timer still doesn't update in the background. I switch back to the app and it would be say 0:45/2:00 and then it updates and dings when I come back to 3:15/2:00.

Steps to repro:

  1. Open workout, start timer
  2. Sleep phone or switch to another app
  3. Wait a few mins, past the timer set
  4. Notice no timer ding.

Expected behavior:

Timer dings/notifies in the background.

Also don't know if there is supposed to be a persistent notif for the app, but I don't see it either.

Great app so far otherwise!

astashov commented 1 year ago

Could you please double-check the notification permissions for the apps in Android settings? Are notifications allowed? On my pixel, I have them there: image000000 image000001

CurtisTD commented 12 months ago

@astashov awesome, so this fixed the problem when I'm in a different app and it now shows the notifications. I'm not sure why they were disabled lol.

However, this still doesn't fix when my screen is asleep. I will wake my phone and it will be past time and then ding.

columndeeply commented 12 months ago

@CurtisTD Maybe your phone is restricting Liftosaur to save battery? On my phone you can change the battery settings for an app by going to "Settings" -> "Battery" -> "Battery Optimisation" -> "Liftosaur" -> "Don't optimise"

CurtisTD commented 12 months ago

@columndeeply it could be. I thought unblocking the notifications fixed it but it's still a transient issue. Sometimes it works, sometimes it fails. Will see if unrestricting battery helps!

astashov commented 12 months ago

@CurtisTD does it still happen? The battery trick worked?

CurtisTD commented 12 months ago

@CurtisTD does it still happen? The battery trick worked?

It's very transient. I'd say like 80% of the time, it seems ok maybe a few seconds late. However, the other time I do not hear a ding even 30 seconds over.

123marvin123 commented 6 months ago

Maybe this issue is somehow related to the premium status not getting queried reliably (for me atleast)? I am also having the same issue regarding the timer but on the iOS app.

https://github.com/astashov/liftosaur/assets/7266447/1e5b58d7-61d8-4393-a932-b1efd84c2d28

MangoB1 commented 5 months ago

Same issue here and I have set battery optimization to unrestricted on my Samsung Galaxy S21

astashov commented 3 months ago

I think I fixed it? It asks for one more permission (to be fired in Do Not Disturb mode), but now it should ring even in silent mode.