Skip to content

Bug: Alarm does not ring automatically at scheduled time (Preview works) #898

@srykaran

Description

@srykaran

Description

While working on the fix for alarm saving in #896, I noticed that alarms still do not ring automatically when their scheduled time arrives.

The alarm is now correctly saved to the ISAR database and appears in the alarm list, but the ringtone is never triggered automatically.

The ringtone only plays when using the Preview Alarm feature.

This suggests the issue may be related to alarm scheduling or the native alarm trigger mechanism rather than the database or UI.


Steps to Reproduce

  1. Run the application on a physical Android device
  2. Create a new alarm for 1–2 minutes in the future
  3. Save the alarm
  4. Wait until the scheduled time

Expected Behavior

The alarm should automatically trigger and play the ringtone at the scheduled time.


Actual Behavior

The alarm does not ring automatically.

The ringtone only plays when the Preview Alarm button is used.


Notes

  • The alarm is correctly stored in the ISAR database
  • The alarm appears correctly in the alarm list UI
  • The alarm persists after restarting the app

Logs

During debugging the following logs appear:

STOPPED IF CONDITION with latest = TimeOfDay(...)
FLUTTER CALLED CANCEL ALARMS

Environment

Flutter version: 3.22.2 (via FVM)
Platform: Android
Device: Physical Android device
Android SDK: 34+

I would be happy to investigate and work on fixing this issue.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions