SimpleMobileTools / Simple-Clock

Combination of a beautiful clock with widget, alarm, stopwatch & timer, no ads
https://www.simplemobiletools.com
GNU General Public License v3.0
589 stars 235 forks source link

Missed alarm will secretly disable alarm #490

Open UPBT opened 1 year ago

UPBT commented 1 year ago

Steps to reproduce

  1. assume an alarm for 4 PM to remind you to take a pill or something
  2. You miss hearing the alarm because you are away from your phone.
  3. the app leaves a "notification" which you see and clear at 8 PM.
  4. The next day, your 4 PM alarm does not go off.

Expected behavior: Alarm goes off as programmed

Work Around any alarm disabled by this action can be re-enabled by unchecking and rechecking the "enable" checkbox. There is absolutely no indication that the alarm is disabled except when it does not go off as scheduled, so a user is expected to remember that they missed an alarm and must reset the alarm manually.

App version 5.10.3 on Android 10 via F-droid

pudup commented 1 year ago

This bug can somewhat be reproduced in a different way.

If an alarm goes off and you press home, the alarm will continue going off in the background. If you clear the notification away it will be impossible to stop the alarm at that point barring one way. The one way to stop the alarm is to close the clock app from recents. Doing this prevents the next alarm from being scheduled and you'll have to disable and enable the alarm.

The notification for the alarm should prolly changed to an "Ongoing" notification.

cheggerdev commented 1 year ago

I think I found the issue.

The function snoozeAlarm() does not handle the case of the "Missed Alarm" in the else block (lines 274 - 281) shown below. In the case of the "Missed Alarm" the user does nothing when the dialog appears.

https://github.com/SimpleMobileTools/Simple-Clock/blob/34481fe280e67ff2ceb4cc19d16a422e7dd37227/app/src/main/kotlin/com/simplemobiletools/clock/activities/ReminderActivity.kt#L274-L281