you-apps / ClockYou

Privacy focused clock app built with MD3
https://you-apps.net
GNU General Public License v3.0
480 stars 33 forks source link

Timer not ringing after the phone locks #359

Closed JanicePolito closed 2 months ago

JanicePolito commented 4 months ago

Steps to reproduce

  1. Set timer for 15:00 minutes
  2. Go back to home and leave the phone unattended
  3. After 15:00 the phone don't ring
  4. The notification bubble keeps counting backwards and you have to force stop the app to make it disappear. Tested On Motorola Edge 50 Pro with disabled power saver and with app full access to the battery.

Expected behavior

The timer should ring even when the phone is locked.

Actual behavior

The phone not ringing after the timer reached 0:00, instead the notification bubble starts counting backwards and you have to force stop the app.

Clock You version

8.0 from F-Droid

Android version

Android 14

Other details

Screenshot_20240723-123938_Microsoft Launcher Screenshot_20240723-123957_Clock You

Acknowledgements

czarnyckm commented 2 months ago

Maybe missing permission <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />

flux77 commented 2 months ago

@czarnyckm That permission exists: https://github.com/you-apps/ClockYou/blob/v8.0/app/src/main/AndroidManifest.xml#L9

https://github.com/you-apps/ClockYou/blob/e6097b1659029d22a4dd9dc16b6ca6fc84639cc2/app/src/main/AndroidManifest.xml#L9

flux77 commented 2 months ago

I am also experiencing this issue in Clock You version 8.0 (from F-Droid). My device is Samsung Galaxy A15 running Android 14.

In addition to this issue with the timer, when the screen is locked, the alarm clock does not ring or end up ringing long after the time that I have set. I wonder if that alarm clock problem could be related to this timer issue. @markbara-git Do you have similar issues with your alarms?

flux77 commented 2 months ago

It might be instructive to compare the permissions in Clock You's app manifest against another open source Android alarm clock app such as Fossify Clock, which rings its timers and alarms as expected on my device (Samsung Galaxy A15 running Android 14).

Compare:

I hope that this bug gets fixed soon. Otherwise Clock You is not usable for its intended purpose (i.e. timer, alarms) on Android 14.

czarnyckm commented 2 months ago

I use previous clock you version 7.1 without any issues with Android 14

JanicePolito commented 2 months ago

@flux77 It seems that in my case the alarm works properly. The problem is with the timer.

porkmanager commented 2 months ago

I have the same issue with 8.0 from F-Droid. And sometimes the timer is hanging while it runs.

Tried 7.1 and the timer runs properly for me

Bnyro commented 2 months ago

https://github.com/you-apps/ClockYou/commit/dc40e6178639524cfb305d27890850dff9aed1ae

Bnyro commented 2 months ago

Android automatically killed the timer service when the screen is off and thus also the corresponding notification - the finished notification is now independent of the service (different ID)