Skip to content

Fix/restore alarms after boot#13

Open
Apprentice2907 wants to merge 4 commits into
CCExtractor:mainfrom
Apprentice2907:fix/restore-alarms-after-boot
Open

Fix/restore alarms after boot#13
Apprentice2907 wants to merge 4 commits into
CCExtractor:mainfrom
Apprentice2907:fix/restore-alarms-after-boot

Conversation

@Apprentice2907
Copy link
Copy Markdown

Description

This pull request fixes an issue where alarms fail to ring after a device reboot.
Android clears all AlarmManager alarms on reboot, and the app previously did not restore them.

This PR adds a BOOT_COMPLETED broadcast receiver on Android that notifies Flutter to restore all enabled alarms using the existing alarm scheduling logic.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (code improvement/cleanup without logical changes)
  • UI/Design change

Proposed Changes

  • Added an Android BOOT_COMPLETED BroadcastReceiver to detect device reboots
  • Forwarded the reboot event to Flutter via an existing MethodChannel
  • Implemented alarm restoration logic in Flutter to re-schedule all enabled alarms
  • Ensured no direct database access or schema assumptions on the Android side

Fixes #9

Screenshots

Not applicable (background behavior change; no UI changes).

Checklist

  • Tests have been added or updated to cover the changes
  • Documentation has been updated to reflect the changes
  • Code follows the established coding style guidelines
  • All tests are passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Alarms fail to ring after device reboot (Missing BootReceiver)

1 participant