Files
daily-notification-plugin/android
Matthew Raymer a5fdf8c5b9 fix(android): create NotificationContentEntity in FetchWorker for prefetch
Fix issue where prefetch worker saved content to ContentCache but didn't
create NotificationContentEntity, causing notification worker to skip
notifications with "content_not_found" error.

Changes:
- Extract notificationTime from input data in doWork()
- Create NotificationContentEntity with matching notification_id when
  notificationTime > 0 (prefetch operations)
- Add parsePayload() helper to extract title/body from JSON or plain text
- Save entity to Room database so notification worker can find it

The notification_id format matches NotifyReceiver.kt: "notify_${notificationTime}",
ensuring the notification worker can retrieve content when the alarm fires.

Fixes issue where alarms triggered correctly but notifications were skipped
because DailyNotificationWorker couldn't find content in storage.
2025-11-11 01:06:51 +00:00
..