feat(reminders): snooze + dismiss notification actions #28

Merged
makiolaj merged 2 commits from feat/reminders-snooze into release/v2.8.0 2026-06-22 20:19:37 +00:00
Owner

Adds Snooze and Dismiss action buttons to reminder notifications — the first slice of Release 1 ("Reminders, round two").

What

  • Dismiss clears the reminder notification.
  • Snooze hides it and re-shows it after a user-chosen delay (Settings → Notifications → Snooze duration; presets 5/10/15/30/60 min, default 10).

Why it needs an alarm

The app is otherwise pure provider-broadcast (the Etar model): the calendar provider fires EVENT_REMINDER and we post the notification, then mark the CalendarAlerts row fired. A snoozed reminder has no provider backing — its row is already fired — so snooze self-schedules an exact alarm (setExactAndAllowWhileIdle, inexact fallback if exact alarms are revoked on API 31–32) to re-show it. Primary delivery is unchanged.

Changes

  • ReminderActionReceiver (not exported): SNOOZE / DISMISS / SHOW.
  • ReminderSnoozeScheduler: exact-alarm wrapper.
  • ReminderNotifier: two actions + cancel().
  • snoozeMinutes pref + Settings OptionCard picker.
  • Manifest: USE_EXACT_ALARM + SCHEDULE_EXACT_ALARM (maxSdk 32) + receiver.
  • New ic_notification_snooze/_dismiss drawables, duration_* plurals, en+de strings, snooze-pref tests, CHANGELOG.

Scope note: "absolute time-of-day for all-day reminders" was already shipped in v2.6.0, so it's out of scope here.

Verification

  • assembleDebug + testDebugUnitTest green.
  • On-device (Pixel 10, Android 16): settings row + picker render/persist; notification posts with both actions; tapping Snooze clears it and schedules the exact RTC_WAKEUP re-show alarm; Dismiss/body-tap behave correctly.

🤖 Generated with Claude Code

Adds **Snooze** and **Dismiss** action buttons to reminder notifications — the first slice of Release 1 ("Reminders, round two"). ## What - **Dismiss** clears the reminder notification. - **Snooze** hides it and re-shows it after a user-chosen delay (Settings → Notifications → Snooze duration; presets 5/10/15/30/60 min, default 10). ## Why it needs an alarm The app is otherwise pure provider-broadcast (the Etar model): the calendar provider fires `EVENT_REMINDER` and we post the notification, then mark the `CalendarAlerts` row fired. A snoozed reminder has no provider backing — its row is already fired — so snooze self-schedules an **exact alarm** (`setExactAndAllowWhileIdle`, inexact fallback if exact alarms are revoked on API 31–32) to re-show it. Primary delivery is unchanged. ## Changes - `ReminderActionReceiver` (not exported): SNOOZE / DISMISS / SHOW. - `ReminderSnoozeScheduler`: exact-alarm wrapper. - `ReminderNotifier`: two actions + `cancel()`. - `snoozeMinutes` pref + Settings OptionCard picker. - Manifest: `USE_EXACT_ALARM` + `SCHEDULE_EXACT_ALARM` (maxSdk 32) + receiver. - New `ic_notification_snooze`/`_dismiss` drawables, `duration_*` plurals, en+de strings, snooze-pref tests, CHANGELOG. Scope note: "absolute time-of-day for all-day reminders" was already shipped in v2.6.0, so it's out of scope here. ## Verification - `assembleDebug` + `testDebugUnitTest` green. - On-device (Pixel 10, Android 16): settings row + picker render/persist; notification posts with both actions; tapping **Snooze** clears it and schedules the exact `RTC_WAKEUP` re-show alarm; **Dismiss**/body-tap behave correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
makiolaj added 2 commits 2026-06-22 20:14:06 +00:00
Add "Snooze" and "Dismiss" action buttons to reminder notifications.

The app is otherwise pure provider-broadcast (the Etar model): the calendar
provider fires EVENT_REMINDER and we post the notification, then mark the
CalendarAlerts row fired. A snoozed reminder has no provider backing — its
row is already fired — so snooze self-schedules an exact alarm to re-show
the same notification, while primary delivery is left unchanged.

- ReminderActionReceiver (not exported): SNOOZE cancels + schedules a
  re-show, DISMISS cancels, SHOW (the alarm) re-posts so it can be snoozed
  or dismissed again.
- ReminderSnoozeScheduler: setExactAndAllowWhileIdle, with an inexact
  allow-while-idle fallback if exact alarms are revoked (API 31-32).
- ReminderNotifier: two actions + cancel().
- snoozeMinutes pref (default 10) in Settings -> Notifications, OptionPicker
  presets 5/10/15/30/60.
- Manifest: USE_EXACT_ALARM + SCHEDULE_EXACT_ALARM (maxSdk 32) + receiver.
- New ic_notification_snooze/_dismiss drawables, duration plurals, en+de
  strings, snooze-pref tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs(changelog): note snooze/dismiss reminder actions
All checks were successful
Translations / check (pull_request) Successful in 4s
CI / ci (pull_request) Successful in 4m33s
62ebd48e3c
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
makiolaj merged commit 5e8cb686e9 into release/v2.8.0 2026-06-22 20:19:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: makiolaj/calendula#28