Simple-Clock
Simple-Clock copied to clipboard
Alarm being set incorrectly if previously open in the background before 12 AM, and then opening it after 12 AM to set it.
Okay, this is a bit of a weird one.
The bug and steps to reproduce
- Let's assume that you have an alarm which you normally use, set for
Tomorrow
, not set to specific days of the week - The alarm time does not really matter, let's say 8AM
- The alarm is set to off
- The clock app is open in the background, and it was open any time before 12 AM
- It is now after 12 AM (so technically we are in the following day
- Open the clock app, to enable the alarm
- Under the large text of the time, we can still see written
Tomorrow
- Tick the checkbox next to the clock to enable the alarm
- We now see a notification that the alarm will ring 1 day and 7 hours from now, instead of the expected 7 hours
- To correct the issue, the user must tap on the time, as in to set the alarm, then press okay. The text under the time will show
Today
, and the correct notification of 7 hours left until the alarm goes off is shown
Video
https://github.com/SimpleMobileTools/Simple-Clock/assets/11844042/8daaf4ae-1bd0-4b70-a978-79c9fb3f77c0
Device info
- Pixel 7
- Graphene OS, latest build (based off Android 13)
- App was downloaded from f-droid
My thoughts I hope that this only a life cycle issue, and all you guys need is to make sure that the clock part is reset when re-focusing the app. And I hope it's not something specific to Graphene OS and the restrictions it puts on apps behavior :)
This issue is not specific to GrapheneOS. I'm experiencing the same problem on a Fairphone 4 running stock Android, and it's becoming increasingly frustrating.