Schedule reminders with WorkManager and no exact alarms #25
Labels
No Label
P0
P1
P2
release-blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Privacy-Period-Tracker#25
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
§31: use WorkManager for persistent, inexact reminder work, and do not request exact-alarm permissions — a period reminder does not need alarm-clock precision, and asking for that permission is Play scrutiny bought for nothing.
What to build in a new
core/notificationsmodule:The worker must not do the arithmetic itself.
CycleStatusRulesand the forecast already decide what state the user is in, and a second copy of that logic inside a worker is the classic way for a notification to contradict the screen it deep-links to.Also from §31: request notification permission at an appropriate moment, not blindly on first launch. Onboarding deliberately does not ask; the right moment is when the user enables a reminder.
Verify:
./gradlew :core:notifications:testcovers "is anything due today" for each cycle state; scheduling is inexact (noSCHEDULE_EXACT_ALARMin the merged manifest); and a forecast change cancels and re-enqueues the work.