feat(android): dual prefetch delay, native fetcher, scoped content cache

- Schedule dual content fetch with WorkManager initialDelay to the next
  contentFetch cron; reschedule from prefs after success and on boot when
  dual_fetch_* exists (DualScheduleFetchRecovery + ReactivationManager).
- When contentFetch has no URL, call NativeNotificationContentFetcher with
  FetchContext (prefetch + next notify time); else keep HTTP/mock behavior.
- Add content_cache.cacheScope (dual|daily|legacy), Room v4 migration,
  getLatestByScope; DualScheduleHelper reads dual only; daily fetch paths
  write daily; NotifyReceiver prefers daily/legacy for legacy cache reads.
- Extract ScheduleCronUtils.calculateNextRunTimeMillis for shared cron math.
- Document in README/CHANGELOG; bump package to 2.1.5.
This commit is contained in:
Jose Olarte III
2026-03-25 18:05:57 +08:00
parent a5c5a7e74e
commit 469167a55f
13 changed files with 375 additions and 105 deletions

View File

@@ -1,6 +1,6 @@
# Android dual schedule: native fetch, WorkManager timing, and scoped content cache
**Status:** Draft — implementation plan (pre-code)
**Status:** Implemented (Android) — see CHANGELOG [2.1.5]
**Date:** 2026-03-25
**Scope:** `daily-notification-plugin` Android (Kotlin/Java), dual / “New Activity” schedule (`scheduleDualNotification`)