From a62f54b8a877d78f757373897b36804c203b8351 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Fri, 13 Feb 2026 19:51:49 +0800 Subject: [PATCH] fix(android): Java call sites for scheduleExactNotification need 8th parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add skipPendingIntentIdempotence (false) to NotifyReceiver.scheduleExactNotification calls in DailyNotificationReceiver.java and DailyNotificationWorker.java so consuming apps compile. Rollover paths do not skip idempotence. - DailyNotificationReceiver: scheduleNextNotification() — add 8th arg false - DailyNotificationWorker: scheduleNextNotification() — add 8th arg false - Bump version to 1.1.3 (package.json, CHANGELOG, native/TS refs) --- CHANGELOG.md | 6 ++++++ README.md | 2 +- .../dailynotification/DailyNotificationReceiver.java | 3 ++- .../dailynotification/DailyNotificationWorker.java | 3 ++- .../java/com/timesafari/dailynotification/FetchWorker.kt | 6 +++--- .../java/com/timesafari/dailynotification/NotifyReceiver.kt | 4 ++-- .../com/timesafari/dailynotification/ReactivationManager.kt | 4 ++-- .../storage/DailyNotificationStorageRoom.java | 2 +- package.json | 2 +- src/definitions.ts | 2 +- src/observability.ts | 2 +- src/web.ts | 2 +- 12 files changed, 23 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7986848..416a365 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to the Daily Notification Plugin will be documented in this The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.3] - 2026-02-13 + +### Fixed + +- **Android (Java)**: Java call sites for `NotifyReceiver.scheduleExactNotification()` now pass the 8th parameter `skipPendingIntentIdempotence`, fixing "actual and formal argument lists differ in length" when building consuming apps. Updated `DailyNotificationReceiver.java` and `DailyNotificationWorker.java`. + ## [1.1.2] - 2026-02-13 ### Fixed diff --git a/README.md b/README.md index e776e2d..ba03ca1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Daily Notification Plugin **Author**: Matthew Raymer -**Version**: 1.1.2 (see `package.json` for source of truth) +**Version**: 1.1.3 (see `package.json` for source of truth) **Created**: 2025-09-22 09:22:32 UTC **Last Updated**: 2025-12-23 UTC diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java b/android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java index c1d8cbe..af979fd 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java +++ b/android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java @@ -445,7 +445,8 @@ public class DailyNotificationReceiver extends BroadcastReceiver { false, // isStaticReminder null, // reminderId scheduleId, - com.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE + com.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE, + false // skipPendingIntentIdempotence – rollover path does not skip ); Log.i(TAG, "Next notification scheduled via centralized function: scheduleId=" + scheduleId); diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java b/android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java index 0d3e3e1..a5ed1d8 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java +++ b/android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java @@ -588,7 +588,8 @@ public class DailyNotificationWorker extends Worker { false, // isStaticReminder null, // reminderId scheduleId, - com.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE + com.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE, + false // skipPendingIntentIdempotence – rollover path does not skip ); // Log next scheduled time in readable format diff --git a/android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt b/android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt index 9180ee9..86ab043 100644 --- a/android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt +++ b/android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt @@ -17,7 +17,7 @@ import org.json.JSONObject * Implements exponential backoff and network constraints * * @author Matthew Raymer - * @version 1.1.2 + * @version 1.1.3 */ class FetchWorker( appContext: Context, @@ -205,7 +205,7 @@ class FetchWorker( val entity = com.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, - "1.1.2", // Plugin version + "1.1.3", // Plugin version null, // timesafariDid - can be set if available "daily", title, @@ -301,7 +301,7 @@ class FetchWorker( "timestamp": ${System.currentTimeMillis()}, "content": "Daily notification content", "source": "mock_generator", - "version": "1.1.2" + "version": "1.1.3" } """.trimIndent() return mockData.toByteArray() diff --git a/android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt b/android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt index bf7d00d..953f0b6 100644 --- a/android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt +++ b/android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt @@ -21,7 +21,7 @@ import kotlinx.coroutines.runBlocking * Implements TTL-at-fire logic and notification delivery * * @author Matthew Raymer - * @version 1.1.2 + * @version 1.1.3 */ /** * Source of schedule request - tracks which code path triggered scheduling @@ -246,7 +246,7 @@ class NotifyReceiver : BroadcastReceiver() { val roomStorage = com.timesafari.dailynotification.storage.DailyNotificationStorageRoom(context) val entity = com.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, - "1.1.2", // Plugin version + "1.1.3", // Plugin version null, // timesafariDid - can be set if available "daily", config.title, diff --git a/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt b/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt index 366112e..1b5a84e 100644 --- a/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt +++ b/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt @@ -247,7 +247,7 @@ class ReactivationManager(private val context: Context) { // Create new notification content entry for missed alarm val notification = com.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, - "1.1.2", // Plugin version + "1.1.3", // Plugin version null, // timesafariDid "daily", // notificationType "Daily Notification", @@ -1014,7 +1014,7 @@ class ReactivationManager(private val context: Context) { // Create new notification content entry for missed alarm val notification = com.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, - "1.1.2", // Plugin version + "1.1.3", // Plugin version null, // timesafariDid "daily", // notificationType "Daily Notification", diff --git a/android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java b/android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java index f64b4a8..953897b 100644 --- a/android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java +++ b/android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java @@ -52,7 +52,7 @@ public class DailyNotificationStorageRoom { private final ExecutorService executorService; // Plugin version for migration tracking - private static final String PLUGIN_VERSION = "1.1.2"; + private static final String PLUGIN_VERSION = "1.1.3"; /** * Constructor diff --git a/package.json b/package.json index 07eebe5..1a36c0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@timesafari/daily-notification-plugin", - "version": "1.1.2", + "version": "1.1.3", "description": "TimeSafari Daily Notification Plugin - Enterprise-grade daily notification functionality with dual scheduling, callback support, TTL-at-fire logic, and comprehensive observability across Mobile (Capacitor) and Desktop (Electron) platforms", "main": "dist/plugin.js", "module": "dist/esm/index.js", diff --git a/src/definitions.ts b/src/definitions.ts index 3cda12f..31cc534 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -5,7 +5,7 @@ * Aligned with Android implementation and test requirements * * @author Matthew Raymer - * @version 1.1.2 (see package.json for source of truth) + * @version 1.1.3 (see package.json for source of truth) */ // Import SPI types from content-fetcher.ts diff --git a/src/observability.ts b/src/observability.ts index c3a0ca7..51a5052 100644 --- a/src/observability.ts +++ b/src/observability.ts @@ -3,7 +3,7 @@ * Provides structured logging, event codes, and health monitoring * * @author Matthew Raymer - * @version 1.1.2 + * @version 1.1.3 */ import { diff --git a/src/web.ts b/src/web.ts index 68fd804..ad19c0d 100644 --- a/src/web.ts +++ b/src/web.ts @@ -7,7 +7,7 @@ * This implementation provides clear error messages for all methods. * * @author Matthew Raymer - * @version 1.1.2 + * @version 1.1.3 */ import type {