Files
daily-notification-plugin/docs/platform/android/CONSUMING_APP_ANDROID_NOTES.md
Jose Olarte III 6ad7ff5fe1 docs: reorganize docs into subdirs and fix links
- Keep only index, getting-started, invariants, performance,
  troubleshooting, and file-organization-summary in docs/ root
- Add docs/architecture/ (storage, database interfaces, native fetcher)
- Add docs/deployment/ (deployment-guide, DEPLOYMENT_CHECKLIST)
- Add docs/compliance/ (accessibility, legal, observability)
- Move integration guides and host-app docs to docs/integration/
- Move design/planning and prefetch docs to docs/design/
- Move Android consuming-app and comparison docs to docs/platform/android/
- Move DEPLOYMENT_SUMMARY and TODO-CLASSIFICATION to docs/progress/
- Archive deprecated platform-capability-reference to docs/_archive/
- Point platform-capability links to alarms/01-platform-capability-reference.md
- Update docs/00-INDEX.md with new sections and paths
- Fix cross-references in README, deployment, progress, design, testing,
  and test-app docs
- Remove one-off COMMIT_MESSAGE.txt
2026-03-06 19:51:13 +08:00

1.9 KiB
Raw Blame History

Consuming App Notes — Android Daily Notifications

Brief notes for apps that integrate the daily notification plugin on Android.


Double schedule (rapid successive calls)

If your app calls scheduleDailyNotification twice in quick succession (e.g. within a few hundred ms) for the same reminder, the second call cancels the alarm just set and reschedules. On some devices or OEMs this can contribute to the alarm not firing.

Recommendation: Debounce or guard in the edit-reminder success path so you only call scheduleDailyNotification once per user action (e.g. wait for the first call to resolve before allowing another, or coalesce rapid calls).


Alarm scheduled but not firing (e.g. 6:04)

When logs show "Scheduling OS alarm" and "Updated schedule in database" but the notification never appears:

  1. Confirm the broadcast is delivered
    Run logcat including the receiver:

    adb logcat -v time -s DNP-SCHEDULE:V DailyNotificationWorker:V DailyNotificationReceiver:V
    

    At the scheduled time, check whether DailyNotificationReceiver logs anything. If the Receiver runs, the issue is downstream (WorkManager / display). If it does not run, the OS did not deliver the alarm (Doze, OEM, or alarm replacement).

  2. Avoid double schedule
    Ensure the app is not calling scheduleDailyNotification twice in quick succession for the same reminder (see above).

  3. Plugin fix (v1.1.6+)
    The plugin no longer overwrites the apps schedule row when handling rollover work that uses a daily_rollover_* id, so the apps nextRunAt stays correct after a notification fires.


References