diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index dfa86fc..38b468d 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1239,10 +1239,10 @@ dependencies { -keep @androidx.room.Dao class * # Plugin classes --keep class com.timesafari.dailynotification.** { *; } +-keep class org.timesafari.dailynotification.** { *; } # Capacitor plugin --keep class com.timesafari.dailynotification.DailyNotificationPlugin { *; } +-keep class org.timesafari.dailynotification.DailyNotificationPlugin { *; } # Encryption -keep class javax.crypto.** { *; } diff --git a/BUILDING.md b/BUILDING.md index 3fcaa7f..2e52892 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -653,7 +653,7 @@ public class MainActivity extends BridgeActivity { { "plugins": { "DailyNotification": { - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } } } @@ -728,7 +728,7 @@ The Vue 3 test app uses a **project reference approach** for plugin integration: { "id": "DailyNotification", "name": "DailyNotification", - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] ``` @@ -1128,7 +1128,7 @@ npx cap sync android #### AAR Duplicate Class Issues ```bash # Problem: Duplicate class errors when integrating plugin AAR -# Error: "Duplicate class com.timesafari.dailynotification.BootReceiver found in modules" +# Error: "Duplicate class org.timesafari.dailynotification.BootReceiver found in modules" # Root Cause: Plugin being included both as project reference and as AAR file # Solution 1: Use Project Reference Approach (Recommended) diff --git a/README.md b/README.md index 9d5627e..affe116 100644 --- a/README.md +++ b/README.md @@ -564,12 +564,12 @@ await DailyNotification.updateDailyReminder('morning_checkin', { - - @@ -604,8 +604,8 @@ dependencies { BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.content-fetch - com.timesafari.dailynotification.notification-delivery + org.timesafari.dailynotification.content-fetch + org.timesafari.dailynotification.notification-delivery ``` diff --git a/android/build.gradle b/android/build.gradle index ab7040b..b97c876 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,7 +14,7 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { - namespace "com.timesafari.dailynotification.plugin" + namespace "org.timesafari.dailynotification.plugin" compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35 defaultConfig { diff --git a/android/consumer-rules.pro b/android/consumer-rules.pro index e802fb5..e3063e6 100644 --- a/android/consumer-rules.pro +++ b/android/consumer-rules.pro @@ -2,7 +2,7 @@ # These rules are applied to consuming apps when they use this plugin # Keep plugin classes --keep class com.timesafari.dailynotification.** { *; } +-keep class org.timesafari.dailynotification.** { *; } # Keep Capacitor plugin interface -keep class com.getcapacitor.Plugin { *; } diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 59e2a6f..4659296 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="org.timesafari.dailynotification.plugin"> diff --git a/android/src/main/assets/capacitor.plugins.json b/android/src/main/assets/capacitor.plugins.json index 7e6409d..30aeef7 100644 --- a/android/src/main/assets/capacitor.plugins.json +++ b/android/src/main/assets/capacitor.plugins.json @@ -2,7 +2,7 @@ { "pkg": "@timesafari/daily-notification-plugin", "name": "DailyNotification", - "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" + "classpath": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] \ No newline at end of file diff --git a/android/src/main/java/com/timesafari/dailynotification/BootReceiver.kt b/android/src/main/java/org/timesafari/dailynotification/BootReceiver.kt similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/BootReceiver.kt rename to android/src/main/java/org/timesafari/dailynotification/BootReceiver.kt index f12821d..09a9b66 100644 --- a/android/src/main/java/com/timesafari/dailynotification/BootReceiver.kt +++ b/android/src/main/java/org/timesafari/dailynotification/BootReceiver.kt @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.content.BroadcastReceiver import android.content.Context diff --git a/android/src/main/java/com/timesafari/dailynotification/ChannelManager.java b/android/src/main/java/org/timesafari/dailynotification/ChannelManager.java similarity index 92% rename from android/src/main/java/com/timesafari/dailynotification/ChannelManager.java rename to android/src/main/java/org/timesafari/dailynotification/ChannelManager.java index affbeff..d36a7e8 100644 --- a/android/src/main/java/com/timesafari/dailynotification/ChannelManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/ChannelManager.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.NotificationChannel; import android.app.NotificationManager; @@ -43,7 +43,7 @@ public class ChannelManager { Log.d(TAG, "Ensuring notification channel exists"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - NotificationChannel channel = notificationManager.getNotificationChannel(com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); + NotificationChannel channel = notificationManager.getNotificationChannel(org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); if (channel == null) { Log.d(TAG, "Creating notification channel"); @@ -72,7 +72,7 @@ public class ChannelManager { public boolean isChannelEnabled() { try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - NotificationChannel channel = notificationManager.getNotificationChannel(com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); + NotificationChannel channel = notificationManager.getNotificationChannel(org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); if (channel == null) { Log.w(TAG, "Channel does not exist"); return false; @@ -99,7 +99,7 @@ public class ChannelManager { public int getChannelImportance() { try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - NotificationChannel channel = notificationManager.getNotificationChannel(com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); + NotificationChannel channel = notificationManager.getNotificationChannel(org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); if (channel != null) { return channel.getImportance(); } @@ -117,7 +117,7 @@ public class ChannelManager { * @return true if settings intent was launched, false otherwise */ public boolean openChannelSettings() { - return openChannelSettings(com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); + return openChannelSettings(org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); } /** @@ -142,7 +142,7 @@ public class ChannelManager { try { Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS) .putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName()) - .putExtra(Settings.EXTRA_CHANNEL_ID, channelId != null ? channelId : com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID) + .putExtra(Settings.EXTRA_CHANNEL_ID, channelId != null ? channelId : org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); @@ -180,11 +180,11 @@ public class ChannelManager { private void createDefaultChannel() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel( - com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID, - com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_NAME, + org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID, + org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH ); - channel.setDescription(com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_DESCRIPTION); + channel.setDescription(org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_DESCRIPTION); channel.enableLights(true); channel.enableVibration(true); channel.setShowBadge(true); @@ -200,7 +200,7 @@ public class ChannelManager { * @return the default channel ID */ public String getDefaultChannelId() { - return com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID; + return org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID; } /** @@ -209,7 +209,7 @@ public class ChannelManager { public void logChannelStatus() { try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - NotificationChannel channel = notificationManager.getNotificationChannel(com.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); + NotificationChannel channel = notificationManager.getNotificationChannel(org.timesafari.dailynotification.DailyNotificationConstants.DEFAULT_CHANNEL_ID); if (channel != null) { Log.i(TAG, "Channel Status - ID: " + channel.getId() + ", Importance: " + channel.getImportance() + diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationConstants.kt b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationConstants.kt similarity index 97% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationConstants.kt rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationConstants.kt index 1d695e3..772adbf 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationConstants.kt +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationConstants.kt @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification +package org.timesafari.dailynotification /** * Centralized constants for Daily Notification Plugin @@ -56,7 +56,7 @@ object DailyNotificationConstants { * Action string for notification broadcast intents * Used by AlarmManager PendingIntents */ - const val ACTION_NOTIFICATION = "com.timesafari.daily.NOTIFICATION" + const val ACTION_NOTIFICATION = "org.timesafari.daily.NOTIFICATION" // ============================================================ // Intent Extras Keys diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationETagManager.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationETagManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationETagManager.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationETagManager.java index 39c7d3c..d42d97d 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationETagManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationETagManager.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.util.Log; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationErrorHandler.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationErrorHandler.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationErrorHandler.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationErrorHandler.java index 09415aa..53de16a 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationErrorHandler.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationErrorHandler.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.util.Log; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationExactAlarmManager.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationExactAlarmManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationExactAlarmManager.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationExactAlarmManager.java index 49f2101..4891440 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationExactAlarmManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationExactAlarmManager.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.AlarmManager; import android.app.PendingIntent; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationFetchWorker.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationFetchWorker.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationFetchWorker.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationFetchWorker.java index b947138..2767cbf 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationFetchWorker.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationFetchWorker.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.util.Log; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationFetcher.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationFetcher.java similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationFetcher.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationFetcher.java index e5ce391..3e3c034 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationFetcher.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationFetcher.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.util.Log; @@ -42,7 +42,7 @@ public class DailyNotificationFetcher { private final Context context; private final DailyNotificationStorage storage; // Deprecated path (kept for transitional read paths) - private final com.timesafari.dailynotification.storage.DailyNotificationStorageRoom roomStorage; // Preferred path + private final org.timesafari.dailynotification.storage.DailyNotificationStorageRoom roomStorage; // Preferred path private final WorkManager workManager; // ETag manager for efficient fetching @@ -60,7 +60,7 @@ public class DailyNotificationFetcher { public DailyNotificationFetcher(Context context, DailyNotificationStorage storage, - com.timesafari.dailynotification.storage.DailyNotificationStorageRoom roomStorage) { + org.timesafari.dailynotification.storage.DailyNotificationStorageRoom roomStorage) { this.context = context; this.storage = storage; this.roomStorage = roomStorage; @@ -220,8 +220,8 @@ public class DailyNotificationFetcher { return; } try { - com.timesafari.dailynotification.entities.NotificationContentEntity entity = - new com.timesafari.dailynotification.entities.NotificationContentEntity( + org.timesafari.dailynotification.entities.NotificationContentEntity entity = + new org.timesafari.dailynotification.entities.NotificationContentEntity( content.getId() != null ? content.getId() : java.util.UUID.randomUUID().toString(), "1.0.0", null, diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationJWTManager.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationJWTManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationJWTManager.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationJWTManager.java index 390ff10..941f760 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationJWTManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationJWTManager.java @@ -9,7 +9,7 @@ * @created 2025-10-03 06:53:30 UTC */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.util.Log; import android.content.Context; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationMaintenanceWorker.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationMaintenanceWorker.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationMaintenanceWorker.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationMaintenanceWorker.java index 444520a..17c7716 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationMaintenanceWorker.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationMaintenanceWorker.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.util.Log; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationMigration.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationMigration.java similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationMigration.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationMigration.java index 1b83aad..1a67779 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationMigration.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationMigration.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.ContentValues; import android.content.Context; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationPerformanceOptimizer.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationPerformanceOptimizer.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationPerformanceOptimizer.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationPerformanceOptimizer.java index c2c9359..e4a3201 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationPerformanceOptimizer.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationPerformanceOptimizer.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.os.Debug; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationPlugin.kt b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationPlugin.kt similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationPlugin.kt rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationPlugin.kt index 78ac11d..0bba457 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationPlugin.kt +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationPlugin.kt @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.Manifest import android.app.Activity @@ -18,7 +18,7 @@ import androidx.work.WorkManager import androidx.work.OneTimeWorkRequestBuilder import androidx.work.Data import java.util.concurrent.TimeUnit -import com.timesafari.dailynotification.DailyNotificationFetchWorker +import org.timesafari.dailynotification.DailyNotificationFetchWorker import com.getcapacitor.JSObject import com.getcapacitor.Plugin import com.getcapacitor.PluginCall @@ -585,7 +585,7 @@ open class DailyNotificationPlugin : Plugin() { CoroutineScope(Dispatchers.IO).launch { try { - val config = com.timesafari.dailynotification.entities.NotificationConfigEntity( + val config = org.timesafari.dailynotification.entities.NotificationConfigEntity( configId, null, "native_fetcher", "config", configValue, "json" ) getDatabase().notificationConfigDao().insertConfig(config) @@ -2153,7 +2153,7 @@ open class DailyNotificationPlugin : Plugin() { ?: return@launch call.reject("Config value is required") val configDataType = configJson.getString("configDataType", "string") - val entity = com.timesafari.dailynotification.entities.NotificationConfigEntity( + val entity = org.timesafari.dailynotification.entities.NotificationConfigEntity( id, timesafariDid, configType, configKey, configValue, configDataType ) @@ -2285,7 +2285,7 @@ open class DailyNotificationPlugin : Plugin() { } } - private fun configToJson(config: com.timesafari.dailynotification.entities.NotificationConfigEntity): JSObject { + private fun configToJson(config: org.timesafari.dailynotification.entities.NotificationConfigEntity): JSObject { return JSObject().apply { put("id", config.id) put("timesafariDid", config.timesafariDid) @@ -2474,7 +2474,7 @@ object TestDataHelper { suspend fun injectInvalidNotificationData(database: DailyNotificationDatabase): Boolean { return try { val invalidNotification = - com.timesafari.dailynotification.entities.NotificationContentEntity() + org.timesafari.dailynotification.entities.NotificationContentEntity() invalidNotification.id = "" // Empty ID - should be skipped by recovery invalidNotification.title = "Test Invalid Notification" invalidNotification.body = "This has an empty ID" @@ -2683,7 +2683,7 @@ object ScheduleHelper { // Persist title/body for this scheduleId so rollover and post-reboot resolve user content // (see plugin-feedback-android-rollover-double-fire-and-user-content) try { - val entity = com.timesafari.dailynotification.entities.NotificationContentEntity( + val entity = org.timesafari.dailynotification.entities.NotificationContentEntity( scheduleId, "1.3.1", null, diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationRebootRecoveryManager.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationRebootRecoveryManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationRebootRecoveryManager.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationRebootRecoveryManager.java index 36f0265..42647f1 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationRebootRecoveryManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationRebootRecoveryManager.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.BroadcastReceiver; import android.content.Context; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationReceiver.java similarity index 97% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationReceiver.java index 684c3cf..42070af 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationReceiver.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationReceiver.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -59,7 +59,7 @@ public class DailyNotificationReceiver extends BroadcastReceiver { return; } - if ("com.timesafari.daily.NOTIFICATION".equals(action)) { + if ("org.timesafari.daily.NOTIFICATION".equals(action)) { // Parse intent and enqueue work - keep receiver ultra-light String notificationId = intent.getStringExtra(EXTRA_NOTIFICATION_ID); if (notificationId == null) { @@ -72,7 +72,7 @@ public class DailyNotificationReceiver extends BroadcastReceiver { enqueueNotificationWork(context, notificationId, intent); Log.d(TAG, "DN|RECEIVE_OK enqueued=" + notificationId); - } else if ("com.timesafari.daily.DISMISS".equals(action)) { + } else if ("org.timesafari.daily.DISMISS".equals(action)) { // Handle dismissal - also lightweight String notificationId = intent.getStringExtra(EXTRA_NOTIFICATION_ID); if (notificationId != null) { @@ -362,7 +362,7 @@ public class DailyNotificationReceiver extends BroadcastReceiver { // Add dismiss action Intent dismissIntent = new Intent(context, DailyNotificationReceiver.class); - dismissIntent.setAction("com.timesafari.daily.DISMISS"); + dismissIntent.setAction("org.timesafari.daily.DISMISS"); dismissIntent.putExtra(EXTRA_NOTIFICATION_ID, content.getId()); PendingIntent dismissPendingIntent = PendingIntent.getBroadcast( @@ -432,8 +432,8 @@ public class DailyNotificationReceiver extends BroadcastReceiver { } // Create config for next notification - com.timesafari.dailynotification.UserNotificationConfig config = - new com.timesafari.dailynotification.UserNotificationConfig( + org.timesafari.dailynotification.UserNotificationConfig config = + new org.timesafari.dailynotification.UserNotificationConfig( true, // enabled cronExpression, content.getTitle() != null ? content.getTitle() : "Daily Notification", @@ -444,14 +444,14 @@ public class DailyNotificationReceiver extends BroadcastReceiver { ); // Use centralized scheduling function with ROLLOVER_ON_FIRE source - com.timesafari.dailynotification.NotifyReceiver.scheduleExactNotification( + org.timesafari.dailynotification.NotifyReceiver.scheduleExactNotification( context, nextScheduledTime, config, false, // isStaticReminder null, // reminderId scheduleId, - com.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE, + org.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE, false // skipPendingIntentIdempotence – rollover path does not skip ); diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationRollingWindow.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationRollingWindow.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationRollingWindow.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationRollingWindow.java index f712442..5fc0048 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationRollingWindow.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationRollingWindow.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.util.Log; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationScheduler.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationScheduler.java index 9b004bc..f1d0828 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationScheduler.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.AlarmManager; import android.app.PendingIntent; @@ -157,8 +157,8 @@ public class DailyNotificationScheduler { // Create intent for the notification; setPackage ensures AlarmManager delivery on all OEMs Intent intent = new Intent(context, DailyNotificationReceiver.class); intent.setPackage(context.getPackageName()); - intent.setAction(com.timesafari.dailynotification.DailyNotificationConstants.ACTION_NOTIFICATION); - intent.putExtra(com.timesafari.dailynotification.DailyNotificationConstants.EXTRA_NOTIFICATION_ID, content.getId()); + intent.setAction(org.timesafari.dailynotification.DailyNotificationConstants.ACTION_NOTIFICATION); + intent.putExtra(org.timesafari.dailynotification.DailyNotificationConstants.EXTRA_NOTIFICATION_ID, content.getId()); // Check if this is a static reminder if (content.getId().startsWith("reminder_") || content.getId().contains("_reminder")) { @@ -481,7 +481,7 @@ public class DailyNotificationScheduler { try { Log.d(TAG, "Scheduling test alarm in " + secondsFromNow + " seconds"); // Delegate to NotifyReceiver.testAlarm() - com.timesafari.dailynotification.NotifyReceiver.Companion.testAlarm(context, secondsFromNow); + org.timesafari.dailynotification.NotifyReceiver.Companion.testAlarm(context, secondsFromNow); Log.i(TAG, "Test alarm scheduled successfully"); } catch (Exception e) { Log.e(TAG, "Error scheduling test alarm", e); @@ -591,7 +591,7 @@ public class DailyNotificationScheduler { // Note: NotifyReceiver.isAlarmScheduled is a Kotlin companion object function with default parameters // From Java, we need to use Companion and provide explicit values (null is acceptable for optional params) // Kotlin Long? maps to java.lang.Long in Java - return com.timesafari.dailynotification.NotifyReceiver.Companion.isAlarmScheduled( + return org.timesafari.dailynotification.NotifyReceiver.Companion.isAlarmScheduled( context, scheduleId, triggerAtMillis @@ -624,7 +624,7 @@ public class DailyNotificationScheduler { // Delegate to NotifyReceiver which checks actual AlarmManager state // Note: NotifyReceiver.getNextAlarmTime is a Kotlin companion object function // Kotlin Long? maps to java.lang.Long in Java - return com.timesafari.dailynotification.NotifyReceiver.Companion.getNextAlarmTime(context); + return org.timesafari.dailynotification.NotifyReceiver.Companion.getNextAlarmTime(context); } catch (Exception e) { Log.e(TAG, "Error getting next alarm time", e); return null; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationStorage.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationStorage.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationStorage.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationStorage.java index cc86234..b038c34 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationStorage.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationStorage.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.content.SharedPreferences; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationTTLEnforcer.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationTTLEnforcer.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationTTLEnforcer.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationTTLEnforcer.java index f3fcf1d..724157e 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationTTLEnforcer.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationTTLEnforcer.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.content.SharedPreferences; diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationWorker.java similarity index 97% rename from android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java rename to android/src/main/java/org/timesafari/dailynotification/DailyNotificationWorker.java index e43ec77..de01ba5 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationWorker.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyNotificationWorker.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -30,9 +30,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.ConcurrentHashMap; -import com.timesafari.dailynotification.storage.DailyNotificationStorageRoom; -import com.timesafari.dailynotification.entities.NotificationContentEntity; -import com.timesafari.dailynotification.DailyNotificationFetcher; +import org.timesafari.dailynotification.storage.DailyNotificationStorageRoom; +import org.timesafari.dailynotification.entities.NotificationContentEntity; +import org.timesafari.dailynotification.DailyNotificationFetcher; /** * WorkManager worker for processing daily notifications @@ -382,7 +382,7 @@ public class DailyNotificationWorker extends Worker { // Create one-time work request androidx.work.OneTimeWorkRequest softRefetchWork = new androidx.work.OneTimeWorkRequest.Builder( - com.timesafari.dailynotification.SoftRefetchWorker.class) + org.timesafari.dailynotification.SoftRefetchWorker.class) .setConstraints(constraints) .setInputData(inputData) .setInitialDelay(softRefetchTime - System.currentTimeMillis(), java.util.concurrent.TimeUnit.MILLISECONDS) @@ -469,7 +469,7 @@ public class DailyNotificationWorker extends Worker { // Add action buttons // 1. Dismiss action Intent dismissIntent = new Intent(getApplicationContext(), DailyNotificationReceiver.class); - dismissIntent.setAction("com.timesafari.daily.DISMISS"); + dismissIntent.setAction("org.timesafari.daily.DISMISS"); dismissIntent.putExtra("notification_id", content.getId()); PendingIntent dismissPendingIntent = PendingIntent.getBroadcast( @@ -550,14 +550,14 @@ public class DailyNotificationWorker extends Worker { // When firing run used daily_rollover_* id, resolve canonical schedule so we still apply rolloverIntervalMinutes String logicalScheduleIdForRollover = scheduleIdForRollover; if (scheduleIdForRollover != null && scheduleIdForRollover.startsWith("daily_rollover_")) { - com.timesafari.dailynotification.Schedule canonical = com.timesafari.dailynotification.ScheduleHelper.getCanonicalRolloverScheduleBlocking(getApplicationContext()); + org.timesafari.dailynotification.Schedule canonical = org.timesafari.dailynotification.ScheduleHelper.getCanonicalRolloverScheduleBlocking(getApplicationContext()); if (canonical != null) { logicalScheduleIdForRollover = canonical.getId(); } } Integer rolloverMinutes = null; if (logicalScheduleIdForRollover != null && !logicalScheduleIdForRollover.isEmpty()) { - com.timesafari.dailynotification.Schedule s = com.timesafari.dailynotification.ScheduleHelper.getScheduleBlocking(getApplicationContext(), logicalScheduleIdForRollover); + org.timesafari.dailynotification.Schedule s = org.timesafari.dailynotification.ScheduleHelper.getScheduleBlocking(getApplicationContext(), logicalScheduleIdForRollover); if (s != null && s.getRolloverIntervalMinutes() != null && s.getRolloverIntervalMinutes() > 0) { rolloverMinutes = s.getRolloverIntervalMinutes(); Log.d(TAG, "DN|ROLLOVER_INTERVAL scheduleId=" + logicalScheduleIdForRollover + " minutes=" + rolloverMinutes); @@ -621,8 +621,8 @@ public class DailyNotificationWorker extends Worker { } // Create config for next notification - com.timesafari.dailynotification.UserNotificationConfig config = - new com.timesafari.dailynotification.UserNotificationConfig( + org.timesafari.dailynotification.UserNotificationConfig config = + new org.timesafari.dailynotification.UserNotificationConfig( true, // enabled cronExpression, content.getTitle() != null ? content.getTitle() : "Daily Notification", @@ -634,18 +634,18 @@ public class DailyNotificationWorker extends Worker { // Use centralized scheduling function with ROLLOVER_ON_FIRE source Log.d(TAG, "DN|ROLLOVER next=" + nextScheduledTime + " scheduleId=" + scheduleId + " static=" + preserveStaticReminder); - com.timesafari.dailynotification.NotifyReceiver.scheduleExactNotification( + org.timesafari.dailynotification.NotifyReceiver.scheduleExactNotification( getApplicationContext(), nextScheduledTime, config, preserveStaticReminder, // isStaticReminder – preserve so next run keeps title/body preserveStaticReminder ? scheduleId : null, // reminderId scheduleId, - com.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE, + org.timesafari.dailynotification.ScheduleSource.ROLLOVER_ON_FIRE, false // skipPendingIntentIdempotence – rollover path does not skip ); if (scheduleId != null && !scheduleId.startsWith("daily_rollover_")) { - com.timesafari.dailynotification.ScheduleHelper.updateScheduleNextRunTimeBlocking( + org.timesafari.dailynotification.ScheduleHelper.updateScheduleNextRunTimeBlocking( getApplicationContext(), scheduleId, content.getScheduledTime(), nextScheduledTime); } // Log next scheduled time in readable format @@ -693,8 +693,8 @@ public class DailyNotificationWorker extends Worker { private NotificationContent getContentByScheduleId(String scheduleId) { if (scheduleId == null || scheduleId.isEmpty()) return null; try { - com.timesafari.dailynotification.DailyNotificationDatabase db = - com.timesafari.dailynotification.DailyNotificationDatabase.getInstance(getApplicationContext()); + org.timesafari.dailynotification.DailyNotificationDatabase db = + org.timesafari.dailynotification.DailyNotificationDatabase.getInstance(getApplicationContext()); NotificationContentEntity entity = db.notificationContentDao().getNotificationById(scheduleId); if (entity == null) { entity = db.notificationContentDao().getNotificationById("daily_" + scheduleId); @@ -716,8 +716,8 @@ public class DailyNotificationWorker extends Worker { try { DailyNotificationStorageRoom room = new DailyNotificationStorageRoom(getApplicationContext()); // Use unified database (Kotlin schema with Java entities) - com.timesafari.dailynotification.DailyNotificationDatabase db = - com.timesafari.dailynotification.DailyNotificationDatabase.getInstance(getApplicationContext()); + org.timesafari.dailynotification.DailyNotificationDatabase db = + org.timesafari.dailynotification.DailyNotificationDatabase.getInstance(getApplicationContext()); NotificationContentEntity entity = db.notificationContentDao().getNotificationById(notificationId); if (entity != null) { return mapEntityToContent(entity); diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyReminderInfo.java b/android/src/main/java/org/timesafari/dailynotification/DailyReminderInfo.java similarity index 93% rename from android/src/main/java/com/timesafari/dailynotification/DailyReminderInfo.java rename to android/src/main/java/org/timesafari/dailynotification/DailyReminderInfo.java index a040000..288ae36 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyReminderInfo.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyReminderInfo.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; /** * Information about a scheduled daily reminder diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyReminderManager.java b/android/src/main/java/org/timesafari/dailynotification/DailyReminderManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DailyReminderManager.java rename to android/src/main/java/org/timesafari/dailynotification/DailyReminderManager.java index 592ce79..604dc4c 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyReminderManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/DailyReminderManager.java @@ -9,7 +9,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.content.SharedPreferences; diff --git a/android/src/main/java/com/timesafari/dailynotification/DatabaseSchema.kt b/android/src/main/java/org/timesafari/dailynotification/DatabaseSchema.kt similarity index 97% rename from android/src/main/java/com/timesafari/dailynotification/DatabaseSchema.kt rename to android/src/main/java/org/timesafari/dailynotification/DatabaseSchema.kt index 06a385c..5fe307b 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DatabaseSchema.kt +++ b/android/src/main/java/org/timesafari/dailynotification/DatabaseSchema.kt @@ -1,15 +1,15 @@ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.content.Context import androidx.room.* import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase -import com.timesafari.dailynotification.entities.NotificationContentEntity -import com.timesafari.dailynotification.entities.NotificationDeliveryEntity -import com.timesafari.dailynotification.entities.NotificationConfigEntity -import com.timesafari.dailynotification.dao.NotificationContentDao -import com.timesafari.dailynotification.dao.NotificationDeliveryDao -import com.timesafari.dailynotification.dao.NotificationConfigDao +import org.timesafari.dailynotification.entities.NotificationContentEntity +import org.timesafari.dailynotification.entities.NotificationDeliveryEntity +import org.timesafari.dailynotification.entities.NotificationConfigEntity +import org.timesafari.dailynotification.dao.NotificationContentDao +import org.timesafari.dailynotification.dao.NotificationDeliveryDao +import org.timesafari.dailynotification.dao.NotificationConfigDao /** * Unified SQLite schema for Daily Notification Plugin diff --git a/android/src/main/java/com/timesafari/dailynotification/DozeFallbackWorker.java b/android/src/main/java/org/timesafari/dailynotification/DozeFallbackWorker.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/DozeFallbackWorker.java rename to android/src/main/java/org/timesafari/dailynotification/DozeFallbackWorker.java index b13f26e..c10969c 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DozeFallbackWorker.java +++ b/android/src/main/java/org/timesafari/dailynotification/DozeFallbackWorker.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.AlarmManager; import android.content.Context; diff --git a/android/src/main/java/com/timesafari/dailynotification/EnhancedDailyNotificationFetcher.java b/android/src/main/java/org/timesafari/dailynotification/EnhancedDailyNotificationFetcher.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/EnhancedDailyNotificationFetcher.java rename to android/src/main/java/org/timesafari/dailynotification/EnhancedDailyNotificationFetcher.java index 1a66378..869010e 100644 --- a/android/src/main/java/com/timesafari/dailynotification/EnhancedDailyNotificationFetcher.java +++ b/android/src/main/java/org/timesafari/dailynotification/EnhancedDailyNotificationFetcher.java @@ -9,7 +9,7 @@ * @created 2025-10-03 06:53:30 UTC */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.util.Log; diff --git a/android/src/main/java/com/timesafari/dailynotification/FetchContext.java b/android/src/main/java/org/timesafari/dailynotification/FetchContext.java similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/FetchContext.java rename to android/src/main/java/org/timesafari/dailynotification/FetchContext.java index 8c7d5c2..5b7d548 100644 --- a/android/src/main/java/com/timesafari/dailynotification/FetchContext.java +++ b/android/src/main/java/org/timesafari/dailynotification/FetchContext.java @@ -11,7 +11,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt b/android/src/main/java/org/timesafari/dailynotification/FetchWorker.kt similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt rename to android/src/main/java/org/timesafari/dailynotification/FetchWorker.kt index 6046d83..24fb64d 100644 --- a/android/src/main/java/com/timesafari/dailynotification/FetchWorker.kt +++ b/android/src/main/java/org/timesafari/dailynotification/FetchWorker.kt @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.content.Context import android.os.SystemClock @@ -203,7 +203,7 @@ class FetchWorker( val notificationId = "notify_$notificationTime" val (title, body) = parsePayload(payload) - val entity = com.timesafari.dailynotification.entities.NotificationContentEntity( + val entity = org.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, "1.3.3", // Plugin version null, // timesafariDid - can be set if available diff --git a/android/src/main/java/com/timesafari/dailynotification/NativeNotificationContentFetcher.java b/android/src/main/java/org/timesafari/dailynotification/NativeNotificationContentFetcher.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/NativeNotificationContentFetcher.java rename to android/src/main/java/org/timesafari/dailynotification/NativeNotificationContentFetcher.java index a2e98be..4576f52 100644 --- a/android/src/main/java/com/timesafari/dailynotification/NativeNotificationContentFetcher.java +++ b/android/src/main/java/org/timesafari/dailynotification/NativeNotificationContentFetcher.java @@ -15,7 +15,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import androidx.annotation.NonNull; import java.util.List; diff --git a/android/src/main/java/com/timesafari/dailynotification/NotificationContent.java b/android/src/main/java/org/timesafari/dailynotification/NotificationContent.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/NotificationContent.java rename to android/src/main/java/org/timesafari/dailynotification/NotificationContent.java index 685020f..a4b8155 100644 --- a/android/src/main/java/com/timesafari/dailynotification/NotificationContent.java +++ b/android/src/main/java/org/timesafari/dailynotification/NotificationContent.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.util.Log; import java.util.UUID; diff --git a/android/src/main/java/com/timesafari/dailynotification/NotificationStatusChecker.java b/android/src/main/java/org/timesafari/dailynotification/NotificationStatusChecker.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/NotificationStatusChecker.java rename to android/src/main/java/org/timesafari/dailynotification/NotificationStatusChecker.java index 121cf26..b75d3b0 100644 --- a/android/src/main/java/com/timesafari/dailynotification/NotificationStatusChecker.java +++ b/android/src/main/java/org/timesafari/dailynotification/NotificationStatusChecker.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.NotificationManager; import android.content.Context; @@ -518,13 +518,13 @@ public class NotificationStatusChecker { * @param database Database instance for querying schedules and history * @return JSObject containing notification status (schedules, last notification time, etc.) */ - public JSObject getNotificationStatus(com.timesafari.dailynotification.DailyNotificationDatabase database) { + public JSObject getNotificationStatus(org.timesafari.dailynotification.DailyNotificationDatabase database) { try { Log.d(TAG, "DN|NOTIFICATION_STATUS_START"); // Delegate to Kotlin helper function (uses runBlocking internally) // This is safe because status checks are quick operations - return com.timesafari.dailynotification.NotificationStatusHelper.getNotificationStatusBlocking(database); + return org.timesafari.dailynotification.NotificationStatusHelper.getNotificationStatusBlocking(database); } catch (Exception e) { Log.e(TAG, "DN|NOTIFICATION_STATUS_ERR err=" + e.getMessage(), e); diff --git a/android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt b/android/src/main/java/org/timesafari/dailynotification/NotifyReceiver.kt similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt rename to android/src/main/java/org/timesafari/dailynotification/NotifyReceiver.kt index f9fca13..597302a 100644 --- a/android/src/main/java/com/timesafari/dailynotification/NotifyReceiver.kt +++ b/android/src/main/java/org/timesafari/dailynotification/NotifyReceiver.kt @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.app.AlarmManager import android.app.AlarmManager.AlarmClockInfo @@ -148,9 +148,9 @@ class NotifyReceiver : BroadcastReceiver() { val notificationId = reminderId ?: "notify_${triggerAtMillis}" val requestCode = getRequestCode(stableScheduleId) - val checkIntent = Intent(context, com.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { + val checkIntent = Intent(context, org.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { setPackage(context.packageName) - action = "com.timesafari.daily.NOTIFICATION" + action = "org.timesafari.daily.NOTIFICATION" } // IDEMPOTENCE CHECK: Verify no existing alarm for this trigger time before scheduling. @@ -254,8 +254,8 @@ class NotifyReceiver : BroadcastReceiver() { // Always create a notification content entity for recovery tracking // Phase 1: Recovery needs NotificationContentEntity to detect missed notifications - val roomStorage = com.timesafari.dailynotification.storage.DailyNotificationStorageRoom(context) - val entity = com.timesafari.dailynotification.entities.NotificationContentEntity( + val roomStorage = org.timesafari.dailynotification.storage.DailyNotificationStorageRoom(context) + val entity = org.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, "1.3.3", // Plugin version null, // timesafariDid - can be set if available @@ -288,9 +288,9 @@ class NotifyReceiver : BroadcastReceiver() { // FIX: Use DailyNotificationReceiver (registered in manifest) instead of NotifyReceiver // FIX: Set action to match manifest registration; setPackage() ensures AlarmManager // delivery reaches this app on all OEMs (see daily-notification-plugin-android-receiver-issue) - val intent = Intent(context, com.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { + val intent = Intent(context, org.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { setPackage(context.packageName) - action = "com.timesafari.daily.NOTIFICATION" // Must match manifest intent-filter action + action = "org.timesafari.daily.NOTIFICATION" // Must match manifest intent-filter action putExtra("notification_id", notificationId) // DailyNotificationReceiver expects this extra putExtra("schedule_id", stableScheduleId) // Add stable scheduleId for tracking // Also preserve original extras for backward compatibility if needed @@ -484,9 +484,9 @@ class NotifyReceiver : BroadcastReceiver() { fun cancelNotification(context: Context, scheduleId: String? = null, triggerAtMillis: Long? = null) { val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager // FIX: Use DailyNotificationReceiver to match what was scheduled - val intent = Intent(context, com.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { + val intent = Intent(context, org.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { setPackage(context.packageName) - action = "com.timesafari.daily.NOTIFICATION" + action = "org.timesafari.daily.NOTIFICATION" } val requestCode = when { scheduleId != null -> getRequestCode(scheduleId) @@ -540,9 +540,9 @@ class NotifyReceiver : BroadcastReceiver() { */ fun isAlarmScheduled(context: Context, scheduleId: String? = null, triggerAtMillis: Long? = null): Boolean { // FIX: Use DailyNotificationReceiver to match what was scheduled - val intent = Intent(context, com.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { + val intent = Intent(context, org.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { setPackage(context.packageName) - action = "com.timesafari.daily.NOTIFICATION" + action = "org.timesafari.daily.NOTIFICATION" } val requestCode = when { scheduleId != null -> getRequestCode(scheduleId) diff --git a/android/src/main/java/com/timesafari/dailynotification/PendingIntentManager.java b/android/src/main/java/org/timesafari/dailynotification/PendingIntentManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/PendingIntentManager.java rename to android/src/main/java/org/timesafari/dailynotification/PendingIntentManager.java index 3f9632f..006063d 100644 --- a/android/src/main/java/com/timesafari/dailynotification/PendingIntentManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/PendingIntentManager.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.AlarmManager; import android.app.PendingIntent; diff --git a/android/src/main/java/com/timesafari/dailynotification/PermissionManager.java b/android/src/main/java/org/timesafari/dailynotification/PermissionManager.java similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/PermissionManager.java rename to android/src/main/java/org/timesafari/dailynotification/PermissionManager.java index 206671d..ed69273 100644 --- a/android/src/main/java/com/timesafari/dailynotification/PermissionManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/PermissionManager.java @@ -8,7 +8,7 @@ * @version 2.0.0 - Modular Architecture */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.Manifest; import android.content.Context; @@ -87,7 +87,7 @@ public class PermissionManager { androidx.core.app.ActivityCompat.requestPermissions( activity, new String[]{android.Manifest.permission.POST_NOTIFICATIONS}, - com.timesafari.dailynotification.DailyNotificationConstants.PERMISSION_REQUEST_CODE // Centralized constant + org.timesafari.dailynotification.DailyNotificationConstants.PERMISSION_REQUEST_CODE // Centralized constant ); Log.d(TAG, "Permission dialog shown, waiting for user response"); @@ -125,7 +125,7 @@ public class PermissionManager { * * @return PermissionStatus with all permission states */ - public com.timesafari.dailynotification.PermissionStatus getPermissionStatus() { + public org.timesafari.dailynotification.PermissionStatus getPermissionStatus() { boolean postNotificationsGranted = false; boolean exactAlarmsGranted = false; boolean notificationsEnabledAtOsLevel = false; @@ -168,7 +168,7 @@ public class PermissionManager { batteryOptimizationsIgnored = true; // Pre-Android 6, no battery optimization restrictions } - return new com.timesafari.dailynotification.PermissionStatus( + return new org.timesafari.dailynotification.PermissionStatus( postNotificationsGranted, exactAlarmsGranted, batteryOptimizationsIgnored, @@ -187,7 +187,7 @@ public class PermissionManager { try { Log.d(TAG, "Checking permission status"); - com.timesafari.dailynotification.PermissionStatus status = getPermissionStatus(); + org.timesafari.dailynotification.PermissionStatus status = getPermissionStatus(); JSObject result = status.toJSObject(); result.put("success", true); diff --git a/android/src/main/java/com/timesafari/dailynotification/PermissionStatus.kt b/android/src/main/java/org/timesafari/dailynotification/PermissionStatus.kt similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/PermissionStatus.kt rename to android/src/main/java/org/timesafari/dailynotification/PermissionStatus.kt index 12d7a97..bc1704c 100644 --- a/android/src/main/java/com/timesafari/dailynotification/PermissionStatus.kt +++ b/android/src/main/java/org/timesafari/dailynotification/PermissionStatus.kt @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification +package org.timesafari.dailynotification /** * Comprehensive permission status model diff --git a/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt b/android/src/main/java/org/timesafari/dailynotification/ReactivationManager.kt similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt rename to android/src/main/java/org/timesafari/dailynotification/ReactivationManager.kt index d7fea6c..00840e5 100644 --- a/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt +++ b/android/src/main/java/org/timesafari/dailynotification/ReactivationManager.kt @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.app.PendingIntent import android.content.Context @@ -280,7 +280,7 @@ class ReactivationManager(private val context: Context) { db.notificationContentDao().updateNotification(existing) } else { // Create new notification content entry for missed alarm - val notification = com.timesafari.dailynotification.entities.NotificationContentEntity( + val notification = org.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, "1.3.3", // Plugin version null, // timesafariDid @@ -479,9 +479,9 @@ class ReactivationManager(private val context: Context) { private fun alarmsExist(): Boolean { return try { // Check if any PendingIntent for our receiver exists (must match NotifyReceiver schedule path) - val intent = Intent(context, com.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { + val intent = Intent(context, org.timesafari.dailynotification.DailyNotificationReceiver::class.java).apply { setPackage(context.packageName) - action = "com.timesafari.daily.NOTIFICATION" + action = "org.timesafari.daily.NOTIFICATION" } val pendingIntent = PendingIntent.getBroadcast( context, @@ -1050,7 +1050,7 @@ class ReactivationManager(private val context: Context) { db.notificationContentDao().updateNotification(existing) } else { // Create new notification content entry for missed alarm - val notification = com.timesafari.dailynotification.entities.NotificationContentEntity( + val notification = org.timesafari.dailynotification.entities.NotificationContentEntity( notificationId, "1.3.3", // Plugin version null, // timesafariDid diff --git a/android/src/main/java/com/timesafari/dailynotification/SchedulingPolicy.java b/android/src/main/java/org/timesafari/dailynotification/SchedulingPolicy.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/SchedulingPolicy.java rename to android/src/main/java/org/timesafari/dailynotification/SchedulingPolicy.java index f28bb21..261b3b4 100644 --- a/android/src/main/java/com/timesafari/dailynotification/SchedulingPolicy.java +++ b/android/src/main/java/org/timesafari/dailynotification/SchedulingPolicy.java @@ -11,7 +11,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/android/src/main/java/com/timesafari/dailynotification/SoftRefetchWorker.java b/android/src/main/java/org/timesafari/dailynotification/SoftRefetchWorker.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/SoftRefetchWorker.java rename to android/src/main/java/org/timesafari/dailynotification/SoftRefetchWorker.java index fa0df18..6516b6e 100644 --- a/android/src/main/java/com/timesafari/dailynotification/SoftRefetchWorker.java +++ b/android/src/main/java/org/timesafari/dailynotification/SoftRefetchWorker.java @@ -8,7 +8,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.os.Trace; diff --git a/android/src/main/java/com/timesafari/dailynotification/TimeSafariIntegrationManager.java b/android/src/main/java/org/timesafari/dailynotification/TimeSafariIntegrationManager.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/TimeSafariIntegrationManager.java rename to android/src/main/java/org/timesafari/dailynotification/TimeSafariIntegrationManager.java index 5c64970..1a81eb3 100644 --- a/android/src/main/java/com/timesafari/dailynotification/TimeSafariIntegrationManager.java +++ b/android/src/main/java/org/timesafari/dailynotification/TimeSafariIntegrationManager.java @@ -24,7 +24,7 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.content.SharedPreferences; diff --git a/android/src/main/java/com/timesafari/dailynotification/dao/NotificationConfigDao.java b/android/src/main/java/org/timesafari/dailynotification/dao/NotificationConfigDao.java similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/dao/NotificationConfigDao.java rename to android/src/main/java/org/timesafari/dailynotification/dao/NotificationConfigDao.java index 6ee9172..2e8fd0d 100644 --- a/android/src/main/java/com/timesafari/dailynotification/dao/NotificationConfigDao.java +++ b/android/src/main/java/org/timesafari/dailynotification/dao/NotificationConfigDao.java @@ -9,10 +9,10 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.dao; +package org.timesafari.dailynotification.dao; import androidx.room.*; -import com.timesafari.dailynotification.entities.NotificationConfigEntity; +import org.timesafari.dailynotification.entities.NotificationConfigEntity; import java.util.List; diff --git a/android/src/main/java/com/timesafari/dailynotification/dao/NotificationContentDao.java b/android/src/main/java/org/timesafari/dailynotification/dao/NotificationContentDao.java similarity index 98% rename from android/src/main/java/com/timesafari/dailynotification/dao/NotificationContentDao.java rename to android/src/main/java/org/timesafari/dailynotification/dao/NotificationContentDao.java index c52fe35..fba372f 100644 --- a/android/src/main/java/com/timesafari/dailynotification/dao/NotificationContentDao.java +++ b/android/src/main/java/org/timesafari/dailynotification/dao/NotificationContentDao.java @@ -9,10 +9,10 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.dao; +package org.timesafari.dailynotification.dao; import androidx.room.*; -import com.timesafari.dailynotification.entities.NotificationContentEntity; +import org.timesafari.dailynotification.entities.NotificationContentEntity; import java.util.List; diff --git a/android/src/main/java/com/timesafari/dailynotification/dao/NotificationDeliveryDao.java b/android/src/main/java/org/timesafari/dailynotification/dao/NotificationDeliveryDao.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/dao/NotificationDeliveryDao.java rename to android/src/main/java/org/timesafari/dailynotification/dao/NotificationDeliveryDao.java index 8852863..739563c 100644 --- a/android/src/main/java/com/timesafari/dailynotification/dao/NotificationDeliveryDao.java +++ b/android/src/main/java/org/timesafari/dailynotification/dao/NotificationDeliveryDao.java @@ -9,10 +9,10 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.dao; +package org.timesafari.dailynotification.dao; import androidx.room.*; -import com.timesafari.dailynotification.entities.NotificationDeliveryEntity; +import org.timesafari.dailynotification.entities.NotificationDeliveryEntity; import java.util.List; diff --git a/android/src/main/java/com/timesafari/dailynotification/entities/NotificationConfigEntity.java b/android/src/main/java/org/timesafari/dailynotification/entities/NotificationConfigEntity.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/entities/NotificationConfigEntity.java rename to android/src/main/java/org/timesafari/dailynotification/entities/NotificationConfigEntity.java index b9801f1..3d1d733 100644 --- a/android/src/main/java/com/timesafari/dailynotification/entities/NotificationConfigEntity.java +++ b/android/src/main/java/org/timesafari/dailynotification/entities/NotificationConfigEntity.java @@ -9,7 +9,7 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.entities; +package org.timesafari.dailynotification.entities; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; diff --git a/android/src/main/java/com/timesafari/dailynotification/entities/NotificationContentEntity.java b/android/src/main/java/org/timesafari/dailynotification/entities/NotificationContentEntity.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/entities/NotificationContentEntity.java rename to android/src/main/java/org/timesafari/dailynotification/entities/NotificationContentEntity.java index 0174924..cf3f80a 100644 --- a/android/src/main/java/com/timesafari/dailynotification/entities/NotificationContentEntity.java +++ b/android/src/main/java/org/timesafari/dailynotification/entities/NotificationContentEntity.java @@ -9,7 +9,7 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.entities; +package org.timesafari.dailynotification.entities; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; diff --git a/android/src/main/java/com/timesafari/dailynotification/entities/NotificationDeliveryEntity.java b/android/src/main/java/org/timesafari/dailynotification/entities/NotificationDeliveryEntity.java similarity index 99% rename from android/src/main/java/com/timesafari/dailynotification/entities/NotificationDeliveryEntity.java rename to android/src/main/java/org/timesafari/dailynotification/entities/NotificationDeliveryEntity.java index 03b86fa..1bcacc8 100644 --- a/android/src/main/java/com/timesafari/dailynotification/entities/NotificationDeliveryEntity.java +++ b/android/src/main/java/org/timesafari/dailynotification/entities/NotificationDeliveryEntity.java @@ -9,7 +9,7 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.entities; +package org.timesafari.dailynotification.entities; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; diff --git a/android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java b/android/src/main/java/org/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java similarity index 97% rename from android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java rename to android/src/main/java/org/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java index efb2a73..c653e1c 100644 --- a/android/src/main/java/com/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java +++ b/android/src/main/java/org/timesafari/dailynotification/storage/DailyNotificationStorageRoom.java @@ -9,18 +9,18 @@ * @since 2025-10-20 */ -package com.timesafari.dailynotification.storage; +package org.timesafari.dailynotification.storage; import android.content.Context; import android.util.Log; -import com.timesafari.dailynotification.DailyNotificationDatabase; -import com.timesafari.dailynotification.dao.NotificationContentDao; -import com.timesafari.dailynotification.dao.NotificationDeliveryDao; -import com.timesafari.dailynotification.dao.NotificationConfigDao; -import com.timesafari.dailynotification.entities.NotificationContentEntity; -import com.timesafari.dailynotification.entities.NotificationDeliveryEntity; -import com.timesafari.dailynotification.entities.NotificationConfigEntity; +import org.timesafari.dailynotification.DailyNotificationDatabase; +import org.timesafari.dailynotification.dao.NotificationContentDao; +import org.timesafari.dailynotification.dao.NotificationDeliveryDao; +import org.timesafari.dailynotification.dao.NotificationConfigDao; +import org.timesafari.dailynotification.entities.NotificationContentEntity; +import org.timesafari.dailynotification.entities.NotificationDeliveryEntity; +import org.timesafari.dailynotification.entities.NotificationConfigEntity; import java.util.List; import java.util.concurrent.CompletableFuture; diff --git a/android/src/test/java/com/timesafari/dailynotification/DailyNotificationRecoveryTests.kt b/android/src/test/java/org/timesafari/dailynotification/DailyNotificationRecoveryTests.kt similarity index 99% rename from android/src/test/java/com/timesafari/dailynotification/DailyNotificationRecoveryTests.kt rename to android/src/test/java/org/timesafari/dailynotification/DailyNotificationRecoveryTests.kt index 4c10fc1..cd40958 100644 --- a/android/src/test/java/com/timesafari/dailynotification/DailyNotificationRecoveryTests.kt +++ b/android/src/test/java/org/timesafari/dailynotification/DailyNotificationRecoveryTests.kt @@ -9,7 +9,7 @@ * @since 2025-12-22 */ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.content.Context import androidx.test.core.app.ApplicationProvider diff --git a/android/src/test/java/com/timesafari/dailynotification/TestDBFactory.kt b/android/src/test/java/org/timesafari/dailynotification/TestDBFactory.kt similarity index 99% rename from android/src/test/java/com/timesafari/dailynotification/TestDBFactory.kt rename to android/src/test/java/org/timesafari/dailynotification/TestDBFactory.kt index 63ab893..98405b7 100644 --- a/android/src/test/java/com/timesafari/dailynotification/TestDBFactory.kt +++ b/android/src/test/java/org/timesafari/dailynotification/TestDBFactory.kt @@ -12,7 +12,7 @@ * @since 2025-12-22 */ -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.content.Context import androidx.room.Room diff --git a/capacitor.config.ts b/capacitor.config.ts index b283cec..77bfdd9 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -1,7 +1,7 @@ import { CapacitorConfig } from '@capacitor/cli'; const config: CapacitorConfig = { - appId: 'com.timesafari.dailynotification', + appId: 'org.timesafari.dailynotification', appName: 'DailyNotification Test App', webDir: 'www', server: { diff --git a/capacitor.plugins.json b/capacitor.plugins.json index 9c4fcb6..34bc538 100644 --- a/capacitor.plugins.json +++ b/capacitor.plugins.json @@ -1,6 +1,6 @@ [ { "name": "DailyNotification", - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index aa14936..0e39a9b 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -38,7 +38,7 @@ pnpm add @timesafari/daily-notification-plugin ```xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch + org.timesafari.dailynotification.fetch ``` @@ -49,7 +49,7 @@ import BackgroundTasks func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - BGTaskScheduler.shared.register(forTaskWithIdentifier: "com.timesafari.dailynotification.fetch", + BGTaskScheduler.shared.register(forTaskWithIdentifier: "org.timesafari.dailynotification.fetch", using: nil) { task in // Handle background fetch task } diff --git a/docs/_archive/2025-legacy-doc/BUILD_SCRIPT_IMPROVEMENTS.md b/docs/_archive/2025-legacy-doc/BUILD_SCRIPT_IMPROVEMENTS.md index c784ab3..996c3e3 100644 --- a/docs/_archive/2025-legacy-doc/BUILD_SCRIPT_IMPROVEMENTS.md +++ b/docs/_archive/2025-legacy-doc/BUILD_SCRIPT_IMPROVEMENTS.md @@ -50,7 +50,7 @@ fi xcrun simctl install "$SIMULATOR_ID" "$APP_PATH" # Launch app -xcrun simctl launch "$SIMULATOR_ID" com.timesafari.dailynotification.test +xcrun simctl launch "$SIMULATOR_ID" org.timesafari.dailynotification.test ``` **Result:** ✅ Simulator now boots and app launches automatically diff --git a/docs/_archive/2025-legacy-doc/IOS_PHASE1_QUICK_REFERENCE.md b/docs/_archive/2025-legacy-doc/IOS_PHASE1_QUICK_REFERENCE.md index 1893af3..77e8fd4 100644 --- a/docs/_archive/2025-legacy-doc/IOS_PHASE1_QUICK_REFERENCE.md +++ b/docs/_archive/2025-legacy-doc/IOS_PHASE1_QUICK_REFERENCE.md @@ -94,7 +94,7 @@ po UNUserNotificationCenter.current().pendingNotificationRequests() po await UNUserNotificationCenter.current().notificationSettings() // Manually trigger BGTask (Simulator only) -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` --- diff --git a/docs/_archive/2025-legacy-doc/IOS_PHASE1_READY_FOR_TESTING.md b/docs/_archive/2025-legacy-doc/IOS_PHASE1_READY_FOR_TESTING.md index 08afef6..e36d119 100644 --- a/docs/_archive/2025-legacy-doc/IOS_PHASE1_READY_FOR_TESTING.md +++ b/docs/_archive/2025-legacy-doc/IOS_PHASE1_READY_FOR_TESTING.md @@ -196,7 +196,7 @@ DailyNotificationScheduler: Scheduling notification: [id] **Solution:** Use simulator-only LLDB command: ```swift -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` ### Notifications Not Delivering diff --git a/docs/_archive/2025-legacy-doc/directives/0003-iOS-Android-Parity-Directive.md b/docs/_archive/2025-legacy-doc/directives/0003-iOS-Android-Parity-Directive.md index 8f48483..ccb31f4 100644 --- a/docs/_archive/2025-legacy-doc/directives/0003-iOS-Android-Parity-Directive.md +++ b/docs/_archive/2025-legacy-doc/directives/0003-iOS-Android-Parity-Directive.md @@ -169,7 +169,7 @@ The plugin class did NOT conform to `CAPBridgedPlugin` protocol, which is requir **Solution Implemented (2025-11-13):** 1. **Added `CAPBridgedPlugin` conformance** via `@objc` extension: - - Implemented `identifier` property (returns `"com.timesafari.dailynotification"`) + - Implemented `identifier` property (returns `"org.timesafari.dailynotification"`) - Implemented `jsName` property (returns `"DailyNotification"`) - Implemented `pluginMethods` property (returns array of all `@objc` methods) @@ -220,7 +220,7 @@ The plugin class did NOT conform to `CAPBridgedPlugin` protocol, which is requir - Added diagnostic check to verify class is in `objc_getClassList()` 2. **Add CAPBridgedPlugin conformance** via `@objc` extension: - - Implemented `identifier` property (returns `"com.timesafari.dailynotification"`) + - Implemented `identifier` property (returns `"org.timesafari.dailynotification"`) - Implemented `jsName` property (returns `"DailyNotification"`) - Implemented `pluginMethods` property (returns array of all `@objc` methods) @@ -750,7 +750,7 @@ A "successful run" is defined as: BGTask handler invoked, content fetch complete 3. **Serial Queue Pattern (Alternative):** ```swift - private let stateQueue = DispatchQueue(label: "com.timesafari.dailynotification.state", attributes: .serial) + private let stateQueue = DispatchQueue(label: "org.timesafari.dailynotification.state", attributes: .serial) ``` 4. **Enforcement:** @@ -1365,8 +1365,8 @@ scripts/ - **Lesson:** Verify actual state, not just command success 5. **Bundle Identifier Mismatch:** - - **Issue:** Script was using `com.timesafari.dailynotification.test` but actual bundle ID is `com.timesafari.dailynotification` - - **Fix:** Updated all launch commands to use correct bundle ID `com.timesafari.dailynotification` + - **Issue:** Script was using `org.timesafari.dailynotification.test` but actual bundle ID is `org.timesafari.dailynotification` + - **Fix:** Updated all launch commands to use correct bundle ID `org.timesafari.dailynotification` - **Root Cause:** Project file has `.test` suffix but Info.plist resolves to base bundle ID - **Files Affected:** `scripts/build-ios-test-app.sh` - **Lesson:** Always verify actual bundle ID from installed app, not just project settings; bundle ID resolution can differ from project settings @@ -1424,7 +1424,7 @@ scripts/ 6. **Permission Reset for Testing:** - **Issue:** Simulator permissions persist across app launches; need to reset for testing - **Fix:** Use `xcrun simctl privacy booted reset all ` to reset permissions - - **Command:** `xcrun simctl privacy booted reset all com.timesafari.dailynotification` + - **Command:** `xcrun simctl privacy booted reset all org.timesafari.dailynotification` - **Lesson:** Simulator permissions don't reset automatically; must manually reset for testing different permission states 7. **JavaScript Method Existence Check:** @@ -1555,7 +1555,7 @@ scripts/ 1. **BGTaskScheduler Not Running:** - Check Info.plist has `BGTaskSchedulerPermittedIdentifiers` - Verify task registered in AppDelegate before app finishes launching - - **Simulator-only debugging trick:** Use LLDB command to manually trigger: `e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"]` + - **Simulator-only debugging trick:** Use LLDB command to manually trigger: `e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"]` - Note: This is for simulator testing only, not available in production - **Testing Guide:** See `doc/test-app-ios/IOS_PREFETCH_TESTING.md` for comprehensive testing procedures diff --git a/docs/ai/AI_INTEGRATION_GUIDE.md b/docs/ai/AI_INTEGRATION_GUIDE.md index 513de4d..c27b2da 100644 --- a/docs/ai/AI_INTEGRATION_GUIDE.md +++ b/docs/ai/AI_INTEGRATION_GUIDE.md @@ -88,7 +88,7 @@ npx cap sync ios cat android/app/src/main/assets/capacitor.plugins.json | grep DailyNotification # Expected output should include: -# "DailyNotification": { "class": "com.timesafari.dailynotification.DailyNotificationPlugin" } +# "DailyNotification": { "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ``` ### Error Handling @@ -151,14 +151,14 @@ cat android/app/src/main/assets/capacitor.plugins.json | grep DailyNotification @@ -176,7 +176,7 @@ grep -A 3 "NotifyReceiver" android/app/src/main/AndroidManifest.xml # Expected output: # BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.content-fetch - com.timesafari.dailynotification.notification-delivery + org.timesafari.dailynotification.content-fetch + org.timesafari.dailynotification.notification-delivery ``` @@ -491,7 +491,7 @@ files: - type: "uses-permission" name: "android.permission.POST_NOTIFICATIONS" - type: "receiver" - name: "com.timesafari.dailynotification.NotifyReceiver" + name: "org.timesafari.dailynotification.NotifyReceiver" attributes: android:enabled: "true" android:exported: "false" diff --git a/docs/ai/code-summary-for-chatgpt.md b/docs/ai/code-summary-for-chatgpt.md index be33942..d71eecd 100644 --- a/docs/ai/code-summary-for-chatgpt.md +++ b/docs/ai/code-summary-for-chatgpt.md @@ -132,7 +132,7 @@ android/plugin/src/main/java/com/timesafari/dailynotification/ ### **BootReceiver Registration** ```xml diff --git a/docs/ai/key-code-snippets-for-chatgpt.md b/docs/ai/key-code-snippets-for-chatgpt.md index 483b174..b12f1f5 100644 --- a/docs/ai/key-code-snippets-for-chatgpt.md +++ b/docs/ai/key-code-snippets-for-chatgpt.md @@ -469,7 +469,7 @@ public class DailyNotificationScheduler { @@ -482,7 +482,7 @@ public class DailyNotificationScheduler { diff --git a/docs/alarms/03-plugin-requirements.md b/docs/alarms/03-plugin-requirements.md index 988e5ba..6ad0b96 100644 --- a/docs/alarms/03-plugin-requirements.md +++ b/docs/alarms/03-plugin-requirements.md @@ -720,7 +720,7 @@ The plugin **MUST NOT** support or guarantee the following behaviors: @@ -730,11 +730,11 @@ The plugin **MUST NOT** support or guarantee the following behaviors: - + ``` @@ -789,15 +789,15 @@ The plugin **MUST NOT** support or guarantee the following behaviors: #### 10.2.2 Background Tasks **Required Background Task Identifiers**: -* `com.timesafari.dailynotification.fetch` - Background fetch -* `com.timesafari.dailynotification.notify` - Notification task (if used) +* `org.timesafari.dailynotification.fetch` - Background fetch +* `org.timesafari.dailynotification.notify` - Notification task (if used) **Background Task Registration**: * Register in `Info.plist`: ```xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch + org.timesafari.dailynotification.fetch ``` diff --git a/docs/alarms/PHASE1-EMULATOR-TESTING.md b/docs/alarms/PHASE1-EMULATOR-TESTING.md index 2be8b98..ec9ad37 100644 --- a/docs/alarms/PHASE1-EMULATOR-TESTING.md +++ b/docs/alarms/PHASE1-EMULATOR-TESTING.md @@ -16,7 +16,7 @@ This guide provides step-by-step instructions for testing Phase 1 (Cold Start Re **Environment** - Device: Android Emulator – Pixel 8 API 34 -- App ID: `com.timesafari.dailynotification` +- App ID: `org.timesafari.dailynotification` - Build: Debug APK from `test-apps/android-test-app` - Script: `./test-phase1.sh` - Date: 27 November 2025 @@ -109,7 +109,7 @@ adb install -r app/build/outputs/apk/debug/app-debug.apk # Verify installation adb shell pm list packages | grep timesafari -# Should show: package:com.timesafari.dailynotification +# Should show: package:org.timesafari.dailynotification ``` ### Option 2: Vue Test App (More Features) @@ -162,7 +162,7 @@ adb logcat -s DNP-REACTIVATION > recovery_test.log ```bash # Launch app to initialize database -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Wait a few seconds for initialization sleep 3 @@ -181,7 +181,7 @@ sleep 3 adb logcat -c # 2. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 3. Schedule notification for 2 minutes in future # (Use app UI or API - see "Scheduling Notifications" below) @@ -195,7 +195,7 @@ adb shell dumpsys alarm | grep -i timesafari # Should show scheduled alarm # 6. Kill app process (simulates OS kill, NOT force stop) -adb shell am kill com.timesafari.dailynotification +adb shell am kill org.timesafari.dailynotification # 7. Verify app is killed adb shell ps | grep timesafari @@ -206,7 +206,7 @@ adb shell ps | grep timesafari # Or: Set system time forward (see "Time Manipulation" below) # 9. Launch app (cold start) -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 10. Check recovery logs immediately adb logcat -d | grep DNP-REACTIVATION @@ -226,11 +226,11 @@ DNP-REACTIVATION: App launch recovery completed: missed=1, rescheduled=0, verifi ```bash # Check database (requires root or debug build) -adb shell run-as com.timesafari.dailynotification sqlite3 databases/daily_notification_plugin.db \ +adb shell run-as org.timesafari.dailynotification sqlite3 databases/daily_notification_plugin.db \ "SELECT id, delivery_status, scheduled_time FROM notification_content WHERE delivery_status = 'missed';" # Or check history table -adb shell run-as com.timesafari.dailynotification sqlite3 databases/daily_notification_plugin.db \ +adb shell run-as org.timesafari.dailynotification sqlite3 databases/daily_notification_plugin.db \ "SELECT * FROM history WHERE kind = 'recovery' ORDER BY occurredAt DESC LIMIT 1;" ``` @@ -254,7 +254,7 @@ adb shell run-as com.timesafari.dailynotification sqlite3 databases/daily_notifi adb logcat -c # 2. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 3. Schedule notification for 10 minutes in future # (Use app UI or API) @@ -276,7 +276,7 @@ adb shell dumpsys alarm | grep -i timesafari # Should show no alarms (or fewer alarms) # 7. Launch app (triggers recovery) -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 8. Check recovery logs adb logcat -d | grep DNP-REACTIVATION @@ -318,7 +318,7 @@ adb logcat -c # See "Database Manipulation" section below # 3. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 4. Check logs immediately adb logcat -d | grep DNP-REACTIVATION @@ -354,7 +354,7 @@ adb logcat -c # See "Database Manipulation" section below # 3. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 4. Check logs adb logcat -d | grep DNP-REACTIVATION @@ -426,10 +426,10 @@ adb shell date -s "2025-11-15 14:30:00" ```bash # Check if app is debuggable -adb shell dumpsys package com.timesafari.dailynotification | grep debuggable +adb shell dumpsys package org.timesafari.dailynotification | grep debuggable # Access database -adb shell run-as com.timesafari.dailynotification sqlite3 databases/daily_notification_plugin.db +adb shell run-as org.timesafari.dailynotification sqlite3 databases/daily_notification_plugin.db # Example: Insert test notification sqlite> INSERT INTO notification_content ( @@ -492,7 +492,7 @@ adb logcat -d > phase1_test_$(date +%Y%m%d_%H%M%S).log #!/bin/bash # Phase 1 Complete Test Sequence -PACKAGE="com.timesafari.dailynotification" +PACKAGE="org.timesafari.dailynotification" ACTIVITY="${PACKAGE}/.MainActivity" echo "=== Phase 1 Testing on Emulator ===" @@ -601,7 +601,7 @@ adb devices **Permission denied for database access**: ```bash # Check if app is debuggable -adb shell dumpsys package com.timesafari.dailynotification | grep debuggable +adb shell dumpsys package org.timesafari.dailynotification | grep debuggable # If not debuggable, rebuild with debug signing cd test-apps/android-test-app @@ -617,7 +617,7 @@ adb install -r app/build/outputs/apk/debug/app-debug.apk adb shell pm list packages | grep timesafari # Uninstall and reinstall -adb uninstall com.timesafari.dailynotification +adb uninstall org.timesafari.dailynotification adb install -r app/build/outputs/apk/debug/app-debug.apk ``` @@ -658,10 +658,10 @@ cd test-apps/android-test-app adb install -r app/build/outputs/apk/debug/app-debug.apk # Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Kill app -adb shell am kill com.timesafari.dailynotification +adb shell am kill org.timesafari.dailynotification # Monitor logs adb logcat -s DNP-REACTIVATION diff --git a/docs/alarms/PHASE2-EMULATOR-TESTING.md b/docs/alarms/PHASE2-EMULATOR-TESTING.md index f48987e..0a140e0 100644 --- a/docs/alarms/PHASE2-EMULATOR-TESTING.md +++ b/docs/alarms/PHASE2-EMULATOR-TESTING.md @@ -90,19 +90,19 @@ Verify that when a force stop clears alarms, the plugin: 3. **Verify alarms are scheduled** * Script runs: ```bash - adb shell dumpsys alarm | grep com.timesafari.dailynotification + adb shell dumpsys alarm | grep org.timesafari.dailynotification ``` - * Confirm at least one `RTC_WAKEUP` alarm for `com.timesafari.dailynotification`. + * Confirm at least one `RTC_WAKEUP` alarm for `org.timesafari.dailynotification`. 4. **Force stop the app** * Script executes: ```bash - adb shell am force-stop com.timesafari.dailynotification + adb shell am force-stop org.timesafari.dailynotification ``` 5. **Confirm alarms after force stop** * Script re-runs `dumpsys alarm`. - * Ideal test case: **0** alarms for `com.timesafari.dailynotification` (alarms cleared). + * Ideal test case: **0** alarms for `org.timesafari.dailynotification` (alarms cleared). 6. **Trigger recovery** * Script clears logcat and launches the app. @@ -165,12 +165,12 @@ Ensure we **do not run heavy force-stop recovery** when alarms are still intact. * Click **Test Notification** again to create a second schedule. 3. **Verify alarms are scheduled** - * Confirm multiple alarms for `com.timesafari.dailynotification` via `dumpsys alarm`. + * Confirm multiple alarms for `org.timesafari.dailynotification` via `dumpsys alarm`. 4. **Simulate a "soft stop"** * Script runs: ```bash - adb shell am kill com.timesafari.dailynotification + adb shell am kill org.timesafari.dailynotification ``` * Intent: stop the process but **not** clear alarms (actual behavior may vary by OS). @@ -217,7 +217,7 @@ Ensure **force-stop recovery is not mis-triggered** when the app is freshly inst 1. **Clear state** * Script uninstalls the app to clear DB/state: ```bash - adb uninstall com.timesafari.dailynotification + adb uninstall org.timesafari.dailynotification ``` 2. **Reinstall APK** @@ -273,7 +273,7 @@ Fill this in after your first successful emulator run. **Environment** - Device: Pixel 8 API 34 (Android 14) -- App ID: `com.timesafari.dailynotification` +- App ID: `org.timesafari.dailynotification` - Build: Debug APK (`app-debug.apk`) from commit `` - Script: `./test-phase2.sh` - Date: 2025-11-XX diff --git a/docs/alarms/PHASE2-VERIFICATION.md b/docs/alarms/PHASE2-VERIFICATION.md index 089633e..caab7d0 100644 --- a/docs/alarms/PHASE2-VERIFICATION.md +++ b/docs/alarms/PHASE2-VERIFICATION.md @@ -1,7 +1,7 @@ # Phase 2 – Force Stop Recovery Verification **Plugin:** Daily Notification Plugin -**Scope:** Force stop detection & recovery (App ID: `com.timesafari.dailynotification`) +**Scope:** Force stop detection & recovery (App ID: `org.timesafari.dailynotification`) **Related Docs:** - `android-implementation-directive-phase2.md` @@ -142,7 +142,7 @@ or: **Environment** * Device: Pixel 8 API 34 (Android 14) -* App ID: `com.timesafari.dailynotification` +* App ID: `org.timesafari.dailynotification` * Build: Debug `app-debug.apk` from commit `` * Script: `./test-phase2.sh` * Date: 2025-11-XX diff --git a/docs/alarms/PHASE3-EMULATOR-TESTING.md b/docs/alarms/PHASE3-EMULATOR-TESTING.md index 20c3165..59f9de2 100644 --- a/docs/alarms/PHASE3-EMULATOR-TESTING.md +++ b/docs/alarms/PHASE3-EMULATOR-TESTING.md @@ -91,7 +91,7 @@ Verify alarms are recreated on boot when schedules have **future run times**. 3. **Verify alarms are scheduled (pre-boot)** * Script calls `show_alarms` and `count_alarms`. - * You should see at least one `RTC_WAKEUP` entry for `com.timesafari.dailynotification`. + * You should see at least one `RTC_WAKEUP` entry for `org.timesafari.dailynotification`. 4. **Reboot emulator** * Script calls `reboot_emulator`: @@ -193,7 +193,7 @@ Verify boot recovery handles an **empty DB / no schedules** safely and does **no 1. **Uninstall app to clear DB/state** * Script calls: ```bash - adb uninstall com.timesafari.dailynotification + adb uninstall org.timesafari.dailynotification ``` 2. **Reinstall APK** diff --git a/docs/alarms/PHASE3-VERIFICATION.md b/docs/alarms/PHASE3-VERIFICATION.md index ac24889..da35324 100644 --- a/docs/alarms/PHASE3-VERIFICATION.md +++ b/docs/alarms/PHASE3-VERIFICATION.md @@ -146,7 +146,7 @@ Script passes if: **Environment** * Device: Pixel 8 API 34 (Android 14) -* App ID: `com.timesafari.dailynotification` +* App ID: `org.timesafari.dailynotification` * Build: Debug `app-debug.apk` from commit `` * Script: `./test-phase3.sh` * Date: 2025-11-XX diff --git a/docs/architecture/NATIVE_FETCHER_CONFIGURATION.md b/docs/architecture/NATIVE_FETCHER_CONFIGURATION.md index 71d3e4d..4841962 100644 --- a/docs/architecture/NATIVE_FETCHER_CONFIGURATION.md +++ b/docs/architecture/NATIVE_FETCHER_CONFIGURATION.md @@ -223,8 +223,8 @@ public class MyNativeFetcher implements NativeNotificationContentFetcher { package com.example.app; import android.app.Application; -import com.timesafari.dailynotification.DailyNotificationPlugin; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.DailyNotificationPlugin; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; public class MyApplication extends Application { @Override @@ -285,7 +285,7 @@ export async function setupDailyNotifications() { package com.example.app; import android.util.Log; -import com.timesafari.dailynotification.*; +import org.timesafari.dailynotification.*; import java.util.*; public class MyNativeFetcher implements NativeNotificationContentFetcher { diff --git a/docs/compliance/legal-store-compliance.md b/docs/compliance/legal-store-compliance.md index 78af96a..1d485b2 100644 --- a/docs/compliance/legal-store-compliance.md +++ b/docs/compliance/legal-store-compliance.md @@ -18,8 +18,8 @@ This document provides comprehensive guidance for legal and store compliance req const iosBackgroundTaskConfig = { // Required: Register background task identifiers backgroundTaskIdentifiers: [ - 'com.timesafari.dailynotification.fetch', - 'com.timesafari.dailynotification.maintenance' + 'org.timesafari.dailynotification.fetch', + 'org.timesafari.dailynotification.maintenance' ], // Required: Background modes in Info.plist diff --git a/docs/design/STARRED_PROJECTS_POLLING_IMPLEMENTATION.md b/docs/design/STARRED_PROJECTS_POLLING_IMPLEMENTATION.md index e30b8cc..fdc0234 100644 --- a/docs/design/STARRED_PROJECTS_POLLING_IMPLEMENTATION.md +++ b/docs/design/STARRED_PROJECTS_POLLING_IMPLEMENTATION.md @@ -794,7 +794,7 @@ class SecureJWTStorage(private val context: Context) { **iOS (iOS Keychain)**: ```swift class SecureJWTStorage { - private let keychain = Keychain(service: "com.timesafari.dailynotification") + private let keychain = Keychain(service: "org.timesafari.dailynotification") func storeJWTSecret(_ secret: String) throws { let data = secret.data(using: .utf8)! @@ -1006,7 +1006,7 @@ fun scheduleImmediateCatchUp() { **iOS (BGTaskScheduler)**: ```swift // BGTaskScheduler Configuration -let taskIdentifier = "com.timesafari.dailynotification.starred-projects-polling" +let taskIdentifier = "org.timesafari.dailynotification.starred-projects-polling" // Register background task BGTaskScheduler.shared.register( @@ -1025,7 +1025,7 @@ try BGTaskScheduler.shared.submit(request) /* BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.starred-projects-polling + org.timesafari.dailynotification.starred-projects-polling UIBackgroundModes @@ -2472,7 +2472,7 @@ interface PollingScheduleConfig { **File**: `src/android/GenericPollingManager.java` ```java -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.Context; import android.util.Log; diff --git a/docs/design/app-startup-recovery-solution.md b/docs/design/app-startup-recovery-solution.md index eb10f86..39298fe 100644 --- a/docs/design/app-startup-recovery-solution.md +++ b/docs/design/app-startup-recovery-solution.md @@ -19,7 +19,7 @@ The initial approach using `BootReceiver` to restore notifications after device ```bash # Boot receiver was registered but not triggered -adb shell "dumpsys package com.timesafari.dailynotification | grep -A5 -B5 BootReceiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A5 -B5 BootReceiver" # Output: BootReceiver registered but not in enabledComponents list # After reboot, no recovery logs appeared @@ -167,7 +167,7 @@ adb shell "dumpsys alarm | grep timesafari" ```bash # 1. Schedule notification -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Tap "Test Notification" (5 minutes from now) # 2. Verify initial scheduling @@ -179,7 +179,7 @@ adb reboot # Wait 2-3 minutes for boot completion # 4. Launch app (triggers recovery) -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 5. Check recovery logs adb logcat -d | grep -i "recovery" | tail -5 diff --git a/docs/design/explore-alarm-behavior-directive.md b/docs/design/explore-alarm-behavior-directive.md index c856559..52bff60 100644 --- a/docs/design/explore-alarm-behavior-directive.md +++ b/docs/design/explore-alarm-behavior-directive.md @@ -621,7 +621,7 @@ Gaps uncovered: adb shell dumpsys alarm | grep -i timesafari # Force kill (not force-stop) - adjust package name based on test app -adb shell am kill com.timesafari.dailynotification +adb shell am kill org.timesafari.dailynotification # Or for test apps: # adb shell am kill com.timesafari.androidtestapp # adb shell am kill diff --git a/docs/design/plugin-requirements-implementation.md b/docs/design/plugin-requirements-implementation.md index 5f5984d..82dc89f 100644 --- a/docs/design/plugin-requirements-implementation.md +++ b/docs/design/plugin-requirements-implementation.md @@ -305,7 +305,7 @@ The plugin **must**: @@ -315,11 +315,11 @@ The plugin **must**: - + ``` @@ -372,15 +372,15 @@ The plugin **must**: #### 5.2.2 Background Tasks **Required Background Task Identifiers**: -* `com.timesafari.dailynotification.fetch` - Background fetch -* `com.timesafari.dailynotification.notify` - Notification task (if used) +* `org.timesafari.dailynotification.fetch` - Background fetch +* `org.timesafari.dailynotification.notify` - Notification task (if used) **Background Task Registration**: * Register in `Info.plist`: ```xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch + org.timesafari.dailynotification.fetch ``` diff --git a/docs/examples/QUICK_START.md b/docs/examples/QUICK_START.md index cc8c0de..5699a80 100644 --- a/docs/examples/QUICK_START.md +++ b/docs/examples/QUICK_START.md @@ -39,7 +39,7 @@ Add to `Info.plist`: ```xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch + org.timesafari.dailynotification.fetch ``` diff --git a/docs/integration/CONSUMING_APP_MIGRATION_COM_TO_ORG.md b/docs/integration/CONSUMING_APP_MIGRATION_COM_TO_ORG.md new file mode 100644 index 0000000..0781d0a --- /dev/null +++ b/docs/integration/CONSUMING_APP_MIGRATION_COM_TO_ORG.md @@ -0,0 +1,129 @@ +# Consuming App Migration: com.timesafari → org.timesafari + +Use this document in your **consuming app** repo (e.g. with Cursor or as a checklist) to migrate from `com.timesafari.dailynotification` to `org.timesafari.dailynotification` after the daily-notification-plugin has been updated. + +## Summary of plugin changes + +The plugin’s package/namespace and public identifiers were renamed: + +- **Package/namespace**: `com.timesafari.dailynotification` → `org.timesafari.dailynotification` +- **Intent action (Android)**: `com.timesafari.daily.NOTIFICATION` → `org.timesafari.daily.NOTIFICATION` +- **Dismiss action (Android)**: `com.timesafari.daily.DISMISS` → `org.timesafari.daily.DISMISS` +- **iOS BGTask identifiers**: `com.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` → `org.timesafari.dailynotification.*` +- **Capacitor plugin class**: `com.timesafari.dailynotification.DailyNotificationPlugin` → `org.timesafari.dailynotification.DailyNotificationPlugin` + +Your app must align with these so the plugin loads and receivers/intents work. + +--- + +## 1. Update plugin dependency + +- Ensure the consuming app depends on a **version of the plugin that already uses `org.timesafari`** (e.g. after the plugin repo’s com→org migration is merged/released). +- Reinstall/sync: `npm install` (or equivalent) so the updated plugin is used. + +--- + +## 2. Capacitor plugin registration (Android & iOS) + +The plugin is registered by **class name**. Update every place that references the plugin class. + +**Typical locations:** + +- `android/app/src/main/assets/capacitor.plugins.json` (or `public/plugins` if you use that) +- Any script or config that writes the plugin class string + +**Change:** + +- From: `"class": "com.timesafari.dailynotification.DailyNotificationPlugin"` or `"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin"` +- To: `"class": "org.timesafari.dailynotification.DailyNotificationPlugin"` or `"classpath": "org.timesafari.dailynotification.DailyNotificationPlugin"` + +If you use a script (e.g. `fix-capacitor-plugins.js`) that injects this class name, update the script to use `org.timesafari.dailynotification.DailyNotificationPlugin`. + +--- + +## 3. Android: `AndroidManifest.xml` + +**Receiver class names** (must match the plugin’s new package): + +- `com.timesafari.dailynotification.DailyNotificationReceiver` → `org.timesafari.dailynotification.DailyNotificationReceiver` +- `com.timesafari.dailynotification.NotifyReceiver` → `org.timesafari.dailynotification.NotifyReceiver` +- `com.timesafari.dailynotification.BootReceiver` → `org.timesafari.dailynotification.BootReceiver` +- Any other `com.timesafari.dailynotification.*` receiver → `org.timesafari.dailynotification.*` + +**Intent action** (must match plugin’s `DailyNotificationConstants.ACTION_NOTIFICATION`): + +- `` → `` + +Search the manifest for `com.timesafari` and replace with `org.timesafari` for these plugin-related entries. + +--- + +## 4. Android: ProGuard / R8 (if you keep plugin classes) + +If you have custom keep rules that reference the plugin package: + +- `com.timesafari.dailynotification` → `org.timesafari.dailynotification` + +(e.g. `-keep class com.timesafari.dailynotification.**` → `-keep class org.timesafari.dailynotification.**`). + +--- + +## 5. iOS: `Info.plist` (BGTask identifiers) + +The plugin uses these background task identifiers. Your app’s `Info.plist` must list the **same** identifiers. + +**In `BGTaskSchedulerPermittedIdentifiers` (or equivalent):** + +- `com.timesafari.dailynotification.fetch` → `org.timesafari.dailynotification.fetch` +- `com.timesafari.dailynotification.notify` → `org.timesafari.dailynotification.notify` + +If you use the prefetch identifier: + +- `com.timesafari.dailynotification.prefetch` → `org.timesafari.dailynotification.prefetch` + +Update any other `com.timesafari.dailynotification.*` task IDs to `org.timesafari.dailynotification.*`. + +--- + +## 6. App ID / Bundle ID (optional; breaking for installs) + +- **Plugin package/namespace** change does **not** require you to change your app’s **applicationId** (Android) or **Bundle ID** (iOS). +- If you **do** change your app’s id from `com.timesafari.*` to `org.timesafari.*`, the store and OS will treat it as a **new app** (new install, no in-place update). Only change this if you intend that. + +--- + +## 7. Custom intent actions / deep links + +If your app or backend uses custom actions that included the old prefix (e.g. `com.timesafari.dailynotification.REFRESH_DATA` or `OPEN_SETTINGS`), update them to `org.timesafari.dailynotification.*` so they still match what the plugin or your code expects. + +--- + +## 8. Scripts and docs in the consuming app + +- Any script that uses the **plugin package** or **intent action** (e.g. `adb shell am start`, `dumpsys package`, or broadcast actions) should use `org.timesafari.dailynotification` and `org.timesafari.daily.NOTIFICATION` where applicable. +- Update internal docs or runbooks that reference the old package or action strings. + +--- + +## 9. Verification + +- **Android**: Build the app, install, and confirm notifications still schedule and fire. Check `adb shell dumpsys package ` for receivers and that alarms use `org.timesafari.daily.NOTIFICATION` if you inspect with `dumpsys alarm`. +- **iOS**: Build and run; confirm BGTask registration and notification behavior. Ensure `Info.plist` identifiers match the plugin’s Swift constants. +- **Capacitor**: Confirm the plugin is loaded (e.g. no “class not found” or missing plugin in the bridge). + +--- + +## Quick find-and-replace (consuming app only) + +Use with care; prefer updating specific files as above. Suggested patterns: + +- **Plugin class**: `com.timesafari.dailynotification.DailyNotificationPlugin` → `org.timesafari.dailynotification.DailyNotificationPlugin` +- **Receiver/package references**: `com.timesafari.dailynotification.` → `org.timesafari.dailynotification.` +- **Notification intent action**: `com.timesafari.daily.NOTIFICATION` → `org.timesafari.daily.NOTIFICATION` +- **BGTask identifiers**: `com.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` → `org.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` + +Do **not** blindly replace `com.timesafari` in your **app’s own** applicationId/Bundle ID unless you intend to ship as a new app. + +--- + +**Reference:** This migration is aligned with the changes in the `daily-notification-plugin` repo (package rename com → org). For plugin-side details, see that repo’s history and docs. diff --git a/docs/integration/INTEGRATION_GUIDE.md b/docs/integration/INTEGRATION_GUIDE.md index a4448ff..a936260 100644 --- a/docs/integration/INTEGRATION_GUIDE.md +++ b/docs/integration/INTEGRATION_GUIDE.md @@ -508,10 +508,10 @@ Add required permissions to `android/app/src/main/AndroidManifest.xml`: - - @@ -599,8 +599,8 @@ Add required permissions to `ios/App/App/Info.plist`: BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.content-fetch - com.timesafari.dailynotification.notification-delivery + org.timesafari.dailynotification.content-fetch + org.timesafari.dailynotification.notification-delivery diff --git a/docs/integration/QUICK_START.md b/docs/integration/QUICK_START.md index 1dd219c..595bf07 100644 --- a/docs/integration/QUICK_START.md +++ b/docs/integration/QUICK_START.md @@ -59,14 +59,14 @@ Add to `android/app/src/main/AndroidManifest.xml`: @@ -108,8 +108,8 @@ Add to `ios/App/App/Info.plist`: BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.content-fetch - com.timesafari.dailynotification.notification-delivery + org.timesafari.dailynotification.content-fetch + org.timesafari.dailynotification.notification-delivery ``` diff --git a/docs/integration/REFACTOR_NOTES.md b/docs/integration/REFACTOR_NOTES.md index f503802..e7e5910 100644 --- a/docs/integration/REFACTOR_NOTES.md +++ b/docs/integration/REFACTOR_NOTES.md @@ -77,7 +77,7 @@ DailyNotificationPlugin.load() **File to Create**: `NativeNotificationContentFetcher.java` ```java -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; public interface NativeNotificationContentFetcher { java.util.concurrent.CompletableFuture> diff --git a/docs/integration/TROUBLESHOOTING.md b/docs/integration/TROUBLESHOOTING.md index 0714345..ebbf132 100644 --- a/docs/integration/TROUBLESHOOTING.md +++ b/docs/integration/TROUBLESHOOTING.md @@ -24,7 +24,7 @@ This document provides comprehensive troubleshooting guidance for integrating th **Error Message:** ``` -Duplicate class com.timesafari.dailynotification.BootReceiver found in modules: +Duplicate class org.timesafari.dailynotification.BootReceiver found in modules: - plugin-debug.aar -> plugin-debug-runtime (:plugin-debug:) - plugin-debug.aar -> plugin-debug-runtime (plugin-debug.aar) ``` @@ -82,7 +82,7 @@ implementation(name: 'plugin-debug', ext: 'aar') { "id": "DailyNotification", "name": "DailyNotification", - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ``` @@ -166,7 +166,7 @@ dependencies { { "id": "DailyNotification", "name": "DailyNotification", - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] ``` diff --git a/docs/integration/host-request-configuration.md b/docs/integration/host-request-configuration.md index d6f9a51..b683229 100644 --- a/docs/integration/host-request-configuration.md +++ b/docs/integration/host-request-configuration.md @@ -180,8 +180,8 @@ await DailyNotification.configure({ iosConfig: { // Background task configuration backgroundTasks: { - 'com.timesafari.daily-notification-fetch': { - identifier: 'com.timesafari.daily-notification-fetch', + 'org.timesafari.daily-notification-fetch': { + identifier: 'org.timesafari.daily-notification-fetch', requiresNetworkConnectivity: true, requiresExternalPower: false, requiresDeviceIdle: false diff --git a/docs/platform/android/APP_ANALYSIS.md b/docs/platform/android/APP_ANALYSIS.md index f0d306e..a69afd5 100644 --- a/docs/platform/android/APP_ANALYSIS.md +++ b/docs/platform/android/APP_ANALYSIS.md @@ -118,7 +118,7 @@ public class MainActivity extends BridgeActivity { ```xml - + @@ -142,16 +142,16 @@ public class MainActivity extends BridgeActivity { - + @@ -164,7 +164,7 @@ public class MainActivity extends BridgeActivity { **Minimal example (recommended):** ```xml @@ -203,7 +203,7 @@ public class MainActivity extends BridgeActivity { ```json { - "appId": "com.timesafari.dailynotification", + "appId": "org.timesafari.dailynotification", "appName": "DailyNotification Test App", "webDir": "www", "server": { @@ -229,7 +229,7 @@ public class MainActivity extends BridgeActivity { [ { "name": "DailyNotification", - "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" + "classpath": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] ``` @@ -429,11 +429,11 @@ dependencies { ```gradle android { - namespace "com.timesafari.dailynotification" + namespace "org.timesafari.dailynotification" compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { - applicationId "com.timesafari.dailynotification" + applicationId "org.timesafari.dailynotification" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 diff --git a/docs/platform/android/APP_IMPROVEMENT_PLAN.md b/docs/platform/android/APP_IMPROVEMENT_PLAN.md index 9578806..d700323 100644 --- a/docs/platform/android/APP_IMPROVEMENT_PLAN.md +++ b/docs/platform/android/APP_IMPROVEMENT_PLAN.md @@ -110,7 +110,7 @@ www/ #### Implementation Plan ```java // New organization -com.timesafari.dailynotification/ +org.timesafari.dailynotification/ ├── plugin/ │ └── DailyNotificationPlugin.java (thin facade) ├── usecases/ @@ -587,16 +587,16 @@ public class SecureNetworkClient { - + @@ -605,7 +605,7 @@ public class SecureNetworkClient { diff --git a/docs/platform/android/IMPLEMENTATION_DIRECTIVE.md b/docs/platform/android/IMPLEMENTATION_DIRECTIVE.md index 7698e3a..9621f24 100644 --- a/docs/platform/android/IMPLEMENTATION_DIRECTIVE.md +++ b/docs/platform/android/IMPLEMENTATION_DIRECTIVE.md @@ -96,7 +96,7 @@ This directive provides **descriptive overview and integration guidance** for An **âš ī¸ Illustrative only** – See Phase 1 for canonical implementation. ```kotlin -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.app.AlarmManager import android.content.Context @@ -763,7 +763,7 @@ private suspend fun handleMissedAlarmOnBoot( ### 5.1 Test Setup -**Package Name**: `com.timesafari.dailynotification` +**Package Name**: `org.timesafari.dailynotification` **Test App Location**: `test-apps/android-test-app/` @@ -806,7 +806,7 @@ adb shell dumpsys jobscheduler | grep -i timesafari #### Step 1: Schedule Alarm **Via Test App UI**: -1. Launch test app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +1. Launch test app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 2. Click "Test Notification" button 3. Schedule alarm for 4 minutes in future (test app default) 4. Note the scheduled time @@ -814,7 +814,7 @@ adb shell dumpsys jobscheduler | grep -i timesafari **Via ADB (Alternative)**: ```bash # Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Wait for app to load, then use UI to schedule # Or use monkey to click button (if button ID known) @@ -835,7 +835,7 @@ adb logcat -d | grep "DN|SCHEDULE\|DN|ALARM" ```bash # Kill app process (simulates OS kill) -adb shell am kill com.timesafari.dailynotification +adb shell am kill org.timesafari.dailynotification # Verify app is killed adb shell ps | grep timesafari @@ -866,7 +866,7 @@ adb shell date ```bash # Launch app (triggers cold start) -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Monitor logs for recovery adb logcat -c # Clear logs first @@ -915,7 +915,7 @@ adb logcat -d | grep -E "DNP-REACTIVATION|COLD_START|missed" #### Step 1: Schedule Multiple Alarms **Via Test App UI**: -1. Launch app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +1. Launch app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 2. Schedule alarm #1 for 2 minutes in future 3. Schedule alarm #2 for 5 minutes in future 4. Schedule alarm #3 for 10 minutes in future @@ -936,7 +936,7 @@ adb logcat -d | grep "DN|SCHEDULE" ```bash # Force stop app (hard kill) -adb shell am force-stop com.timesafari.dailynotification +adb shell am force-stop org.timesafari.dailynotification # Verify app is force-stopped adb shell ps | grep timesafari @@ -963,7 +963,7 @@ adb shell date ```bash # Launch app (triggers force stop recovery) -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Monitor logs immediately adb logcat -c @@ -1014,7 +1014,7 @@ adb shell dumpsys alarm | grep -A 10 timesafari #### Step 1: Schedule Alarm Before Reboot **Via Test App UI**: -1. Launch app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +1. Launch app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 2. Schedule alarm for 5 minutes in future 3. Note scheduled time @@ -1075,7 +1075,7 @@ adb logcat -d | grep -E "DNP-BOOT|BOOT_COMPLETED|reschedule" ```bash # Launch app to verify state -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Check if missed alarms were handled adb logcat -d | grep -E "missed|boot_recovery" @@ -1103,7 +1103,7 @@ adb logcat -d | grep -E "missed|boot_recovery" #### Step 1: Schedule Alarm **Via Test App UI**: -1. Launch app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +1. Launch app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 2. Schedule alarm for 10 minutes in future 3. Note scheduled time @@ -1142,7 +1142,7 @@ adb shell ps | grep timesafari ```bash # Bring app to foreground -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Monitor logs for warm start recovery adb logcat -c @@ -1191,7 +1191,7 @@ adb shell dumpsys alarm | grep -A 5 timesafari ```bash # Launch app and schedule alarm for 4 minutes -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Use UI to schedule alarm ``` @@ -1269,7 +1269,7 @@ adb logcat -d | grep -E "DN|RECEIVE_START|DN|WORK_START|DN|DISPLAY" **Android 12+ (API 31+)**: ```bash # Check current permission status -adb shell dumpsys package com.timesafari.dailynotification | grep -i "schedule_exact_alarm" +adb shell dumpsys package org.timesafari.dailynotification | grep -i "schedule_exact_alarm" # Revoke permission (requires root or system app) # Or use Settings UI: @@ -1299,7 +1299,7 @@ adb logcat -d | grep -E "EXACT_ALARM|permission|SCHEDULE_EXACT" adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM # Or navigate manually: -adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:com.timesafari.dailynotification +adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:org.timesafari.dailynotification ``` #### Step 4: Verify Alarm Scheduling @@ -1412,7 +1412,7 @@ adb shell date +%s ```bash #!/bin/bash -PACKAGE="com.timesafari.dailynotification" +PACKAGE="org.timesafari.dailynotification" ACTIVITY="${PACKAGE}/.MainActivity" echo "=== Test 1: Cold Start Recovery ===" diff --git a/docs/platform/android/PHASE1_DIRECTIVE.md b/docs/platform/android/PHASE1_DIRECTIVE.md index 37e6f10..672e96e 100644 --- a/docs/platform/android/PHASE1_DIRECTIVE.md +++ b/docs/platform/android/PHASE1_DIRECTIVE.md @@ -84,7 +84,7 @@ Phase 1 implements **minimal viable app launch recovery** for cold start scenari ### 2.2 Class Structure ```kotlin -package com.timesafari.dailynotification +package org.timesafari.dailynotification import android.content.Context import android.util.Log @@ -561,9 +561,9 @@ override fun load() { **Steps**: 1. Schedule notification for 2 minutes in future -2. Kill app process: `adb shell am kill com.timesafari.dailynotification` +2. Kill app process: `adb shell am kill org.timesafari.dailynotification` 3. Wait 5 minutes (past scheduled time) -4. Launch app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +4. Launch app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 5. Check logs: `adb logcat -d | grep DNP-REACTIVATION` **Expected**: diff --git a/docs/platform/android/PHASE2_DIRECTIVE.md b/docs/platform/android/PHASE2_DIRECTIVE.md index 6bf6770..7d6cb23 100644 --- a/docs/platform/android/PHASE2_DIRECTIVE.md +++ b/docs/platform/android/PHASE2_DIRECTIVE.md @@ -163,7 +163,7 @@ private fun alarmsExist(): Boolean { // Check if any PendingIntent for our receiver exists // This is more reliable than nextAlarmClock val intent = Intent(context, DailyNotificationReceiver::class.java).apply { - action = "com.timesafari.daily.NOTIFICATION" + action = "org.timesafari.daily.NOTIFICATION" } val pendingIntent = PendingIntent.getBroadcast( context, @@ -629,9 +629,9 @@ private fun calculateNextOccurrence(schedule: Schedule, fromTime: Long): Long { **Steps**: 1. Schedule 3 notifications (2 minutes, 5 minutes, 10 minutes in future) 2. Verify alarms scheduled: `adb shell dumpsys alarm | grep timesafari` -3. Force stop app: `adb shell am force-stop com.timesafari.dailynotification` +3. Force stop app: `adb shell am force-stop org.timesafari.dailynotification` 4. Verify alarms cancelled: `adb shell dumpsys alarm | grep timesafari` (should be empty) -5. Launch app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +5. Launch app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 6. Check logs: `adb logcat -d | grep DNP-REACTIVATION` **Expected**: diff --git a/docs/platform/android/TIMESAFARI_ANDROID_COMPARISON.md b/docs/platform/android/TIMESAFARI_ANDROID_COMPARISON.md index d718f6e..4e5cf23 100644 --- a/docs/platform/android/TIMESAFARI_ANDROID_COMPARISON.md +++ b/docs/platform/android/TIMESAFARI_ANDROID_COMPARISON.md @@ -29,7 +29,7 @@ public class TestApplication extends Application { Context context = getApplicationContext(); NativeNotificationContentFetcher testFetcher = - new com.timesafari.dailynotification.test.TestNativeFetcher(context); + new org.timesafari.dailynotification.test.TestNativeFetcher(context); DailyNotificationPlugin.setNativeFetcher(testFetcher); } } @@ -175,7 +175,7 @@ implementation 'com.google.code.gson:gson:2.10.1' **Test App (Working):** ```xml ``` @@ -183,7 +183,7 @@ implementation 'com.google.code.gson:gson:2.10.1' **TimeSafari (Broken):** ```xml ``` @@ -240,8 +240,8 @@ package app.timesafari; import android.app.Application; import android.content.Context; import android.util.Log; -import com.timesafari.dailynotification.DailyNotificationPlugin; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.DailyNotificationPlugin; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; public class TimeSafariApplication extends Application { @@ -272,8 +272,8 @@ Create file: `android/app/src/main/java/app/timesafari/TimeSafariNativeFetcher.j package app.timesafari; import android.content.Context; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; -import com.timesafari.dailynotification.NotificationContent; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.NotificationContent; public class TimeSafariNativeFetcher implements NativeNotificationContentFetcher { @@ -318,11 +318,11 @@ public class TimeSafariNativeFetcher implements NativeNotificationContentFetcher - + @@ -431,9 +431,9 @@ After implementing fixes, verify: 3. **Test receiver manually:** ```bash - adb shell am broadcast -a com.timesafari.daily.NOTIFICATION \ + adb shell am broadcast -a org.timesafari.daily.NOTIFICATION \ --es id "test_notification" \ - -n app.timesafari.app/com.timesafari.dailynotification.DailyNotificationReceiver + -n app.timesafari.app/org.timesafari.dailynotification.DailyNotificationReceiver ``` 4. **Check notification permissions:** diff --git a/docs/platform/ios/MIGRATION_GUIDE.md b/docs/platform/ios/MIGRATION_GUIDE.md index 90c507a..d2916d6 100644 --- a/docs/platform/ios/MIGRATION_GUIDE.md +++ b/docs/platform/ios/MIGRATION_GUIDE.md @@ -173,10 +173,10 @@ console.log('Performance:', status.performance); - - @@ -209,8 +209,8 @@ dependencies { BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.content-fetch - com.timesafari.dailynotification.notification-delivery + org.timesafari.dailynotification.content-fetch + org.timesafari.dailynotification.notification-delivery ``` diff --git a/docs/platform/ios/TROUBLESHOOTING.md b/docs/platform/ios/TROUBLESHOOTING.md index b4b8c3b..bfc3f64 100644 --- a/docs/platform/ios/TROUBLESHOOTING.md +++ b/docs/platform/ios/TROUBLESHOOTING.md @@ -88,7 +88,7 @@ This guide provides solutions to common iOS-specific issues when using the Daily 1. **Check BGTaskScheduler Registration:** ```swift // Verify registration in AppDelegate - BGTaskScheduler.shared.register(forTaskWithIdentifier: "com.timesafari.dailynotification.fetch", using: nil) { task in + BGTaskScheduler.shared.register(forTaskWithIdentifier: "org.timesafari.dailynotification.fetch", using: nil) { task in // Handler should be registered } ``` @@ -97,7 +97,7 @@ This guide provides solutions to common iOS-specific issues when using the Daily ```xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch + org.timesafari.dailynotification.fetch ``` @@ -364,7 +364,7 @@ print("Registered tasks: \(registered)") **LLDB Command in Xcode:** ```lldb -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` **Note:** This only works in simulator, not on physical devices. diff --git a/docs/progress/03-TEST-RUNS.md b/docs/progress/03-TEST-RUNS.md index f4eec8b..b3fc2b8 100644 --- a/docs/progress/03-TEST-RUNS.md +++ b/docs/progress/03-TEST-RUNS.md @@ -75,10 +75,10 @@ **How to Run:** ```bash # Run all combined edge case tests -cd android && ./gradlew test --tests "com.timesafari.dailynotification.DailyNotificationRecoveryTests" +cd android && ./gradlew test --tests "org.timesafari.dailynotification.DailyNotificationRecoveryTests" # Or run specific test -cd android && ./gradlew test --tests "com.timesafari.dailynotification.DailyNotificationRecoveryTests.test_combined_dst_boundary_duplicate_delivery_cold_start" +cd android && ./gradlew test --tests "org.timesafari.dailynotification.DailyNotificationRecoveryTests.test_combined_dst_boundary_duplicate_delivery_cold_start" ``` --- diff --git a/docs/progress/P2.3-IMPLEMENTATION-CHECKLIST.md b/docs/progress/P2.3-IMPLEMENTATION-CHECKLIST.md index 050505c..cd3f94e 100644 --- a/docs/progress/P2.3-IMPLEMENTATION-CHECKLIST.md +++ b/docs/progress/P2.3-IMPLEMENTATION-CHECKLIST.md @@ -97,7 +97,7 @@ Before starting, verify: **Example placeholder test:** ```kotlin -package com.timesafari.dailynotification +package org.timesafari.dailynotification import org.junit.Test import org.junit.Assert.* @@ -148,7 +148,7 @@ class DailyNotificationRecoveryTests { **Example structure:** ```kotlin -package com.timesafari.dailynotification +package org.timesafari.dailynotification import androidx.room.Room import androidx.room.RoomDatabase diff --git a/docs/progress/P3-EXECUTION-CHECKLIST-MECHANICAL.md b/docs/progress/P3-EXECUTION-CHECKLIST-MECHANICAL.md index ee1ab59..6784879 100644 --- a/docs/progress/P3-EXECUTION-CHECKLIST-MECHANICAL.md +++ b/docs/progress/P3-EXECUTION-CHECKLIST-MECHANICAL.md @@ -793,7 +793,7 @@ Add to `Info.plist`: \`\`\`xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch + org.timesafari.dailynotification.fetch \`\`\` diff --git a/docs/testing/BOOT_RECEIVER_GUIDE.md b/docs/testing/BOOT_RECEIVER_GUIDE.md index 1edf370..a2753f3 100644 --- a/docs/testing/BOOT_RECEIVER_GUIDE.md +++ b/docs/testing/BOOT_RECEIVER_GUIDE.md @@ -13,7 +13,7 @@ This guide provides comprehensive testing procedures for the **fixed BootReceive ### **1. AndroidManifest.xml Updates** ```xml @@ -80,13 +80,13 @@ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { **Steps**: ```bash # Check BootReceiver registration -adb shell "dumpsys package com.timesafari.dailynotification | grep -A10 -B5 BootReceiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A10 -B5 BootReceiver" ``` **Expected Output**: ``` android.intent.action.LOCKED_BOOT_COMPLETED: - a440fcf com.timesafari.dailynotification/.BootReceiver filter 4e5fd5c + a440fcf org.timesafari.dailynotification/.BootReceiver filter 4e5fd5c Action: "android.intent.action.LOCKED_BOOT_COMPLETED" Action: "android.intent.action.BOOT_COMPLETED" Action: "android.intent.action.MY_PACKAGE_REPLACED" @@ -106,7 +106,7 @@ android.intent.action.LOCKED_BOOT_COMPLETED: **Steps**: ```bash # 1. Schedule notification -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Tap "Test Notification" (5 minutes from now) # 2. Verify initial scheduling @@ -147,7 +147,7 @@ BootReceiver: Notification recovery completed: X/X recovered **Steps**: ```bash # 1. Schedule notification -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Tap "Test Notification" (5 minutes from now) # 2. Verify initial scheduling @@ -182,7 +182,7 @@ BootReceiver: Notification recovery completed: X/X recovered **Steps**: ```bash # 1. Schedule notification -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Tap "Test Notification" (5 minutes from now) # 2. Reboot device @@ -211,7 +211,7 @@ BootReceiver: Locked boot completed - ready for full recovery on unlock **Steps**: ```bash # 1. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 2. Tap "Exact Alarm Settings" button # Should open exact alarm settings if needed @@ -230,14 +230,14 @@ adb shell "dumpsys alarm | grep SCHEDULE_EXACT_ALARM" ### **Check BootReceiver Status** ```bash # Verify registration -adb shell "dumpsys package com.timesafari.dailynotification | grep -A10 -B5 BootReceiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A10 -B5 BootReceiver" # Check if enabled adb shell "pm list packages -d | grep timesafari" # Should return nothing (app not disabled) # Check permissions -adb shell "dumpsys package com.timesafari.dailynotification | grep -A5 -B5 permission" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A5 -B5 permission" ``` ### **Monitor Boot Events** @@ -273,13 +273,13 @@ adb shell "dumpsys alarm | grep -A5 -B5 timesafari" **Solutions**: ```bash # Check if receiver is registered -adb shell "dumpsys package com.timesafari.dailynotification | grep BootReceiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep BootReceiver" # Check if app is disabled adb shell "pm list packages -d | grep timesafari" # Check if permissions are granted -adb shell "dumpsys package com.timesafari.dailynotification | grep RECEIVE_BOOT_COMPLETED" +adb shell "dumpsys package org.timesafari.dailynotification | grep RECEIVE_BOOT_COMPLETED" ``` ### **Issue 2: Direct Boot Errors** @@ -288,10 +288,10 @@ adb shell "dumpsys package com.timesafari.dailynotification | grep RECEIVE_BOOT_ **Solutions**: ```bash # Check Direct Boot compatibility -adb shell "dumpsys package com.timesafari.dailynotification | grep directBootAware" +adb shell "dumpsys package org.timesafari.dailynotification | grep directBootAware" # Check device protected storage -adb shell "ls -la /data/user_de/0/com.timesafari.dailynotification/" +adb shell "ls -la /data/user_de/0/org.timesafari.dailynotification/" ``` ### **Issue 3: Exact Alarm Permission Denied** @@ -303,7 +303,7 @@ adb shell "ls -la /data/user_de/0/com.timesafari.dailynotification/" adb shell "dumpsys alarm | grep SCHEDULE_EXACT_ALARM" # Open exact alarm settings -adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM --es android.provider.extra.APP_PACKAGE com.timesafari.dailynotification +adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM --es android.provider.extra.APP_PACKAGE org.timesafari.dailynotification ``` ## 📊 **Success Metrics** diff --git a/docs/testing/COMPREHENSIVE_GUIDE.md b/docs/testing/COMPREHENSIVE_GUIDE.md index 62e5bd9..e491600 100644 --- a/docs/testing/COMPREHENSIVE_GUIDE.md +++ b/docs/testing/COMPREHENSIVE_GUIDE.md @@ -31,7 +31,7 @@ This document provides comprehensive testing procedures for the DailyNotificatio **Steps**: ```bash # 1. Launch app and check channel status -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 2. In app UI, tap "Check Channel Status" # 3. Verify channel exists and is enabled @@ -59,7 +59,7 @@ adb shell "dumpsys notification | grep -A5 'daily_default'" **Steps**: ```bash # 1. Block the notification channel manually -adb shell "am start -a android.settings.CHANNEL_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE com.timesafari.dailynotification -e android.provider.extra.CHANNEL_ID daily_default" +adb shell "am start -a android.settings.CHANNEL_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE org.timesafari.dailynotification -e android.provider.extra.CHANNEL_ID daily_default" # 2. In system settings, disable the channel # 3. Return to app and tap "Check Channel Status" @@ -304,7 +304,7 @@ adb logcat -d | grep -i "recovery.*count" **Steps**: ```bash # 1. Schedule notification -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Tap "Test Notification" in UI # 2. Verify initial scheduling @@ -383,7 +383,7 @@ adb logcat -d | grep -i "recovery.*performed.*recently.*skipping" set -e -APP_PACKAGE="com.timesafari.dailynotification" +APP_PACKAGE="org.timesafari.dailynotification" APP_ACTIVITY=".MainActivity" TEST_TIMEOUT=300 # 5 minutes @@ -645,7 +645,7 @@ import json from typing import Dict, List, Optional, Tuple class DailyNotificationTesterV2: - def __init__(self, package: str = "com.timesafari.dailynotification"): + def __init__(self, package: str = "org.timesafari.dailynotification"): self.package = package self.activity = f"{package}/.MainActivity" self.test_results: Dict[str, bool] = {} @@ -905,7 +905,7 @@ adb shell "svc data disable" **Steps**: ```bash # 1. Enable battery optimization for app -adb shell "dumpsys deviceidle whitelist -com.timesafari.dailynotification" +adb shell "dumpsys deviceidle whitelist -org.timesafari.dailynotification" # 2. Schedule notification # 3. Wait for notification @@ -945,7 +945,7 @@ adb shell "dumpsys deviceidle whitelist -com.timesafari.dailynotification" **Steps**: ```bash # 1. Check initial memory usage -adb shell "dumpsys meminfo com.timesafari.dailynotification" +adb shell "dumpsys meminfo org.timesafari.dailynotification" # 2. Schedule multiple notifications # 3. Check memory usage again @@ -1005,7 +1005,7 @@ adb logcat -d | grep -i "channelmanager" adb shell "dumpsys alarm | grep SCHEDULE_EXACT_ALARM" # Open exact alarm settings -adb shell "am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM -d package:com.timesafari.dailynotification" +adb shell "am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM -d package:org.timesafari.dailynotification" ``` #### Issue 3: JIT Refresh Not Working @@ -1040,10 +1040,10 @@ adb logcat -d | grep -i "recovery.*performed.*recently" # Comprehensive status check adb shell "dumpsys notification | grep -A10 daily_default" adb shell "dumpsys alarm | grep -A5 timesafari" -adb shell "dumpsys package com.timesafari.dailynotification | grep -A5 receiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A5 receiver" # Recovery state check -adb shell "run-as com.timesafari.dailynotification ls -la /data/data/com.timesafari.dailynotification/shared_prefs/" +adb shell "run-as org.timesafari.dailynotification ls -la /data/data/org.timesafari.dailynotification/shared_prefs/" # Channel status check adb shell "cmd notification list | grep daily_default" diff --git a/docs/testing/EMULATOR_GUIDE.md b/docs/testing/EMULATOR_GUIDE.md index 15af9fb..1eb97f2 100644 --- a/docs/testing/EMULATOR_GUIDE.md +++ b/docs/testing/EMULATOR_GUIDE.md @@ -188,10 +188,10 @@ adb install -r app/build/outputs/apk/debug/app-debug.apk ```bash # Launch the app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Alternative: Launch with specific intent -adb shell am start -a android.intent.action.MAIN -n com.timesafari.dailynotification/.MainActivity +adb shell am start -a android.intent.action.MAIN -n org.timesafari.dailynotification/.MainActivity ``` ### 8. Monitor App Logs @@ -231,7 +231,7 @@ cd android && ./gradlew :app:assembleDebug adb install app/build/outputs/apk/debug/app-debug.apk # 6. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 7. Monitor logs adb logcat -s "Capacitor" "DailyNotification" "Console" @@ -259,7 +259,7 @@ npx cap run android cd android ./gradlew :app:assembleDebug adb install app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity ``` ### Method 3: Using Monkey (Alternative Launch) @@ -267,7 +267,7 @@ adb shell am start -n com.timesafari.dailynotification/.MainActivity ```bash # Install and launch with Monkey adb install app/build/outputs/apk/debug/app-debug.apk -adb shell monkey -p com.timesafari.dailynotification -c android.intent.category.LAUNCHER 1 +adb shell monkey -p org.timesafari.dailynotification -c android.intent.category.LAUNCHER 1 ``` ## Troubleshooting @@ -318,7 +318,7 @@ adb version adb shell pm list packages | grep timesafari # Uninstall existing app -adb uninstall com.timesafari.dailynotification +adb uninstall org.timesafari.dailynotification # Install with force adb install -r -t app/build/outputs/apk/debug/app-debug.apk @@ -369,7 +369,7 @@ When the app launches successfully, you should see: ```bash # ADB output -Starting: Intent { cmp=com.timesafari.dailynotification/.MainActivity } +Starting: Intent { cmp=org.timesafari.dailynotification/.MainActivity } # Logcat output D Capacitor: Starting BridgeActivity @@ -415,7 +415,7 @@ The app should display: ./scripts/build-native.sh --platform android cd android && ./gradlew :app:assembleDebug adb install -r app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity ``` ### Automated Testing @@ -426,7 +426,7 @@ adb wait-for-device ./scripts/build-native.sh --platform android cd android && ./gradlew :app:assembleDebug adb install app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Run tests... ``` diff --git a/docs/testing/IOS_LOGGING_GUIDE.md b/docs/testing/IOS_LOGGING_GUIDE.md index 1d9773d..a965258 100644 --- a/docs/testing/IOS_LOGGING_GUIDE.md +++ b/docs/testing/IOS_LOGGING_GUIDE.md @@ -54,7 +54,7 @@ po UNUserNotificationCenter.current().pendingNotificationRequests() po await UNUserNotificationCenter.current().notificationSettings() // Manually trigger BGTask (simulator only) -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` --- @@ -78,7 +78,7 @@ e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWith 3. **Filter logs:** - Click search box (top right) - - Type: `DNP-` or `com.timesafari.dailynotification` + - Type: `DNP-` or `org.timesafari.dailynotification` - Press Enter ### Filter by Subsystem (Structured Logging): @@ -86,14 +86,14 @@ e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWith The plugin uses structured logging with subsystems: ``` -com.timesafari.dailynotification.plugin # Plugin operations -com.timesafari.dailynotification.fetch # Fetch operations -com.timesafari.dailynotification.scheduler # Scheduling operations -com.timesafari.dailynotification.storage # Storage operations +org.timesafari.dailynotification.plugin # Plugin operations +org.timesafari.dailynotification.fetch # Fetch operations +org.timesafari.dailynotification.scheduler # Scheduling operations +org.timesafari.dailynotification.storage # Storage operations ``` **To filter by subsystem:** -- In Console.app search: `subsystem:com.timesafari.dailynotification` +- In Console.app search: `subsystem:org.timesafari.dailynotification` --- @@ -108,7 +108,7 @@ com.timesafari.dailynotification.storage # Storage operations xcrun simctl spawn booted log stream # Stream only plugin logs (filtered) -xcrun simctl spawn booted log stream --predicate 'subsystem == "com.timesafari.dailynotification"' +xcrun simctl spawn booted log stream --predicate 'subsystem == "org.timesafari.dailynotification"' # Stream with DNP- prefix filter xcrun simctl spawn booted log stream | grep "DNP-" @@ -121,7 +121,7 @@ xcrun simctl spawn booted log stream | grep "DNP-" xcrun simctl spawn booted log stream > device.log 2>&1 # Save filtered logs -xcrun simctl spawn booted log stream --predicate 'subsystem == "com.timesafari.dailynotification"' > plugin.log 2>&1 +xcrun simctl spawn booted log stream --predicate 'subsystem == "org.timesafari.dailynotification"' > plugin.log 2>&1 # Then analyze with grep grep -E "\[DNP-(FETCH|SCHEDULER|PLUGIN)\]" device.log @@ -144,7 +144,7 @@ xcrun simctl spawn booted log show --start "2025-11-15 10:00:00" --end "2025-11- xcrun devicectl list devices # Stream logs from physical device (requires device UDID) -xcrun devicectl device process launch --device com.timesafari.dailynotification.test +xcrun devicectl device process launch --device org.timesafari.dailynotification.test # Or use Console.app for physical devices (easier) ``` @@ -162,7 +162,7 @@ xcrun devicectl device process launch --device com.timesafari.dailynotifi ./scripts/validate-ios-logs.sh device.log # From live stream -xcrun simctl spawn booted log stream --predicate 'subsystem == "com.timesafari.dailynotification"' | ./scripts/validate-ios-logs.sh +xcrun simctl spawn booted log stream --predicate 'subsystem == "org.timesafari.dailynotification"' | ./scripts/validate-ios-logs.sh # From filtered grep grep -E "\[DNP-(FETCH|SCHEDULER|PLUGIN)\]" device.log | ./scripts/validate-ios-logs.sh @@ -207,7 +207,7 @@ grep -E "\[DNP-(FETCH|SCHEDULER|PLUGIN)\]" device.log | ./scripts/validate-ios-l **Solutions:** 1. **Use specific filters:** `DNP-` instead of `DailyNotification` -2. **Filter by subsystem:** `subsystem:com.timesafari.dailynotification` +2. **Filter by subsystem:** `subsystem:org.timesafari.dailynotification` 3. **Use time range:** Only show logs from last 5 minutes 4. **Use validation script:** Automatically filters for important events @@ -235,7 +235,7 @@ grep -E "\[DNP-(FETCH|SCHEDULER|PLUGIN)\]" device.log | ./scripts/validate-ios-l ```bash # Stream plugin logs (simulator) -xcrun simctl spawn booted log stream --predicate 'subsystem == "com.timesafari.dailynotification"' +xcrun simctl spawn booted log stream --predicate 'subsystem == "org.timesafari.dailynotification"' # Save logs to file xcrun simctl spawn booted log stream > device.log 2>&1 diff --git a/docs/testing/IOS_PHASE1_TESTING_GUIDE.md b/docs/testing/IOS_PHASE1_TESTING_GUIDE.md index 7267e49..21db54b 100644 --- a/docs/testing/IOS_PHASE1_TESTING_GUIDE.md +++ b/docs/testing/IOS_PHASE1_TESTING_GUIDE.md @@ -150,7 +150,7 @@ po UNUserNotificationCenter.current().pendingNotificationRequests() # Check BGTask scheduling (simulator only) # Use LLDB command in Xcode debugger: -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` --- @@ -316,7 +316,7 @@ DNP-FETCH: BGTask rescheduled for [date] **Manual Trigger (Simulator Only):** ```bash # In Xcode debugger (LLDB) -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` --- @@ -422,8 +422,8 @@ open DailyNotificationPlugin.xcodeproj ```xml BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch - com.timesafari.dailynotification.notify + org.timesafari.dailynotification.fetch + org.timesafari.dailynotification.notify ``` @@ -464,7 +464,7 @@ po await UNUserNotificationCenter.current().notificationSettings() **Check BGTask Status (Simulator Only):** ```swift -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` **Check Storage:** diff --git a/docs/testing/IOS_PREFETCH_TESTING.md b/docs/testing/IOS_PREFETCH_TESTING.md index c7689c1..3f20d17 100644 --- a/docs/testing/IOS_PREFETCH_TESTING.md +++ b/docs/testing/IOS_PREFETCH_TESTING.md @@ -137,7 +137,7 @@ Quick validation checklist (each step links to log verification): - Background fetch - Background processing (if using `BGProcessingTask`) - Info.plist has: - - `BGTaskSchedulerPermittedIdentifiers` array with task identifier: `com.timesafari.dailynotification.fetch` + - `BGTaskSchedulerPermittedIdentifiers` array with task identifier: `org.timesafari.dailynotification.fetch` - Plugin exposes: - `scheduleDailyNotification()` method that schedules both prefetch and notification @@ -186,7 +186,7 @@ Add structured logs at key points: **On app startup:** ``` -[DNP-FETCH] Registering BGTaskScheduler task (id=com.timesafari.dailynotification.fetch) +[DNP-FETCH] Registering BGTaskScheduler task (id=org.timesafari.dailynotification.fetch) ``` **When scheduling:** @@ -197,7 +197,7 @@ Add structured logs at key points: **When BGTask handler fires:** ``` -[DNP-FETCH] BGTask handler invoked (task.identifier=com.timesafari.dailynotification.fetch) +[DNP-FETCH] BGTask handler invoked (task.identifier=org.timesafari.dailynotification.fetch) ``` **Inside prefetch logic:** @@ -239,7 +239,7 @@ Add structured logs at key points: 2. **Open Xcode Debug Console** (View → Debug Area → Activate Console, or press Cmd+Shift+Y) 3. **In LLDB console, paste and execute:** ```bash - e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] + e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` 4. Press Enter @@ -270,7 +270,7 @@ Add structured logs at key points: **Troubleshooting:** - If LLDB command doesn't work, ensure the app is backgrounded first - If you see "Simulate Background Fetch" in menu when app is running, it may be a different Xcode version - try the LLDB method anyway -- Verify BGTask identifier matches exactly: `com.timesafari.dailynotification.fetch` +- Verify BGTask identifier matches exactly: `org.timesafari.dailynotification.fetch` ### 5. Trigger or Wait for Notification @@ -544,7 +544,7 @@ When everything is wired correctly, one full cycle should produce: **Expected logs:** ``` -[DNP-FETCH] Registering BGTaskScheduler task (id=com.timesafari.dailynotification.fetch) +[DNP-FETCH] Registering BGTaskScheduler task (id=org.timesafari.dailynotification.fetch) [DNP-PLUGIN] Startup complete (hasPendingSchedules=true|false) ``` @@ -585,7 +585,7 @@ When everything is wired correctly, one full cycle should produce: **Expected logs:** ``` -[DNP-FETCH] BGTask handler invoked (id=com.timesafari.dailynotification.fetch) +[DNP-FETCH] BGTask handler invoked (id=org.timesafari.dailynotification.fetch) [DNP-FETCH] Resolved next notification needing content (time=..., scheduleId=...) [DNP-FETCH] Starting fetch from (notificationTime=..., jwtPresent=true) [DNP-FETCH] Fetch success (status=200, bytes=1234, ttl=86400) diff --git a/docs/testing/IOS_TEST_APP_REQUIREMENTS.md b/docs/testing/IOS_TEST_APP_REQUIREMENTS.md index df00ee2..4946ab4 100644 --- a/docs/testing/IOS_TEST_APP_REQUIREMENTS.md +++ b/docs/testing/IOS_TEST_APP_REQUIREMENTS.md @@ -132,8 +132,8 @@ The test app's `Info.plist` **MUST** include: BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch - com.timesafari.dailynotification.notify + org.timesafari.dailynotification.fetch + org.timesafari.dailynotification.notify @@ -305,7 +305,7 @@ po await UNUserNotificationCenter.current().notificationSettings() **Manually Trigger BGTask (Simulator Only):** ```swift -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] ``` **Copy-Paste Commands:** @@ -319,7 +319,7 @@ po UNUserNotificationCenter.current().pendingNotificationRequests() po await UNUserNotificationCenter.current().notificationSettings() // Manually trigger BGTask (simulator only) -e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.timesafari.dailynotification.fetch"] +e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"org.timesafari.dailynotification.fetch"] // Force reschedule all tasks (test harness) po DailyNotificationBackgroundTaskTestHarness.forceRescheduleAll() @@ -343,12 +343,12 @@ po DailyNotificationBackgroundTaskTestHarness.simulateTimeWarp(minutesForward: 6 **Structured Logging (Swift Logger):** The plugin uses Swift `Logger` categories for structured logging: -- `com.timesafari.dailynotification.plugin` - Plugin operations -- `com.timesafari.dailynotification.fetch` - Fetch operations -- `com.timesafari.dailynotification.scheduler` - Scheduling operations -- `com.timesafari.dailynotification.storage` - Storage operations +- `org.timesafari.dailynotification.plugin` - Plugin operations +- `org.timesafari.dailynotification.fetch` - Fetch operations +- `org.timesafari.dailynotification.scheduler` - Scheduling operations +- `org.timesafari.dailynotification.storage` - Storage operations -Filter in Console.app by subsystem: `com.timesafari.dailynotification` +Filter in Console.app by subsystem: `org.timesafari.dailynotification` **Phase 2: Log Validation Script** @@ -652,7 +652,7 @@ This can be used for post-run verification and telemetry aggregation. Access via ### In-App Log Viewer (Phase 2) **For QA Use:** -- Read app's unified logging (OSLog) for entries with subsystem `com.timesafari.dailynotification` +- Read app's unified logging (OSLog) for entries with subsystem `org.timesafari.dailynotification` - Present logs on screen or allow export to file - Capture Logger output into text buffer during app session - **Security:** Only enable in test builds, not production diff --git a/docs/testing/IOS_TEST_APP_SETUP.md b/docs/testing/IOS_TEST_APP_SETUP.md index e44ddc3..fdef4b6 100644 --- a/docs/testing/IOS_TEST_APP_SETUP.md +++ b/docs/testing/IOS_TEST_APP_SETUP.md @@ -83,7 +83,7 @@ Create `capacitor.config.json`: ```json { - "appId": "com.timesafari.dailynotification.test", + "appId": "org.timesafari.dailynotification.test", "appName": "DailyNotification Test App", "webDir": "App/App/Public", "server": { @@ -105,8 +105,8 @@ Edit `App/App/Info.plist` and add: BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch - com.timesafari.dailynotification.notify + org.timesafari.dailynotification.fetch + org.timesafari.dailynotification.notify diff --git a/docs/testing/NOTIFICATION_PROCEDURES.md b/docs/testing/NOTIFICATION_PROCEDURES.md index fc881be..7fb13f5 100644 --- a/docs/testing/NOTIFICATION_PROCEDURES.md +++ b/docs/testing/NOTIFICATION_PROCEDURES.md @@ -30,7 +30,7 @@ This document provides comprehensive testing procedures for the DailyNotificatio **Objective**: Verify the plugin loads and registers correctly **Steps**: -1. Launch the app: `adb shell am start -n com.timesafari.dailynotification/.MainActivity` +1. Launch the app: `adb shell am start -n org.timesafari.dailynotification/.MainActivity` 2. Tap "Test Plugin" button 3. Verify status shows "Plugin is loaded and ready!" @@ -97,7 +97,7 @@ This document provides comprehensive testing procedures for the DailyNotificatio **Steps**: 1. Schedule a notification using "Test Notification" -2. Force stop the app: `adb shell am force-stop com.timesafari.dailynotification` +2. Force stop the app: `adb shell am force-stop org.timesafari.dailynotification` 3. Verify app is killed: `adb shell "ps | grep timesafari"` (should return nothing) 4. Wait for scheduled time 5. Check notification panel @@ -132,7 +132,7 @@ Create a test script for automated testing: set -e -APP_PACKAGE="com.timesafari.dailynotification" +APP_PACKAGE="org.timesafari.dailynotification" APP_ACTIVITY=".MainActivity" TEST_TIMEOUT=120 # 2 minutes @@ -251,7 +251,7 @@ import sys from typing import Optional, Dict, Any class DailyNotificationTester: - def __init__(self, package: str = "com.timesafari.dailynotification"): + def __init__(self, package: str = "org.timesafari.dailynotification"): self.package = package self.activity = f"{package}/.MainActivity" @@ -355,19 +355,19 @@ if __name__ == "__main__": ```bash # Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Send to background (normal close) adb shell input keyevent KEYCODE_HOME # Force stop app -adb shell am force-stop com.timesafari.dailynotification +adb shell am force-stop org.timesafari.dailynotification # Check if app is running adb shell "ps | grep timesafari" # Clear app data -adb shell pm clear com.timesafari.dailynotification +adb shell pm clear org.timesafari.dailynotification ``` ### Notification Testing Commands @@ -380,7 +380,7 @@ adb shell "dumpsys notification | grep -A5 -B5 timesafari" adb shell "cmd notification list" # Open notification settings -adb shell "am start -a android.settings.APP_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE com.timesafari.dailynotification" +adb shell "am start -a android.settings.APP_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE org.timesafari.dailynotification" ``` ### Alarm Management Commands @@ -454,7 +454,7 @@ adb logcat -c **Solutions**: - **CRITICAL**: Verify `NotifyReceiver` is registered in `AndroidManifest.xml`: ```xml - @@ -474,10 +474,10 @@ adb logcat -c ```bash # Check app permissions -adb shell dumpsys package com.timesafari.dailynotification | grep permission +adb shell dumpsys package org.timesafari.dailynotification | grep permission # Check app info -adb shell dumpsys package com.timesafari.dailynotification | grep -A10 "Application Info" +adb shell dumpsys package org.timesafari.dailynotification | grep -A10 "Application Info" # Check notification channels adb shell "dumpsys notification | grep -A10 timesafari" diff --git a/docs/testing/PHYSICAL_DEVICE_GUIDE.md b/docs/testing/PHYSICAL_DEVICE_GUIDE.md index 7c97ef1..6f09aa2 100644 --- a/docs/testing/PHYSICAL_DEVICE_GUIDE.md +++ b/docs/testing/PHYSICAL_DEVICE_GUIDE.md @@ -152,7 +152,7 @@ cd android adb install -r app/build/outputs/apk/debug/app-debug.apk # 6. Launch app -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity ``` ### Option C: Using Capacitor CLI @@ -257,7 +257,7 @@ adb logcat -s "DailyNotification" > device_logs.txt ```bash # View scheduled alarms (requires root or debuggable build) -adb shell dumpsys alarm | grep -A 5 "com.timesafari" +adb shell dumpsys alarm | grep -A 5 "org.timesafari" # View alarm statistics adb shell dumpsys alarm | grep -i "daily" @@ -288,7 +288,7 @@ adb shell dumpsys alarm | grep -i "daily" ``` 3. After reboot, check if alarm was restored: ```bash - adb shell dumpsys alarm | grep -A 5 "com.timesafari" + adb shell dumpsys alarm | grep -A 5 "org.timesafari" ``` ### Test Force Stop Recovery @@ -296,7 +296,7 @@ adb shell dumpsys alarm | grep -i "daily" 1. Schedule a notification 2. Force stop the app: ```bash - adb shell am force-stop com.timesafari.dailynotification.test + adb shell am force-stop org.timesafari.dailynotification.test ``` 3. Check if alarms are recovered (implementation dependent) @@ -321,7 +321,7 @@ cd android adb install -r app/build/outputs/apk/debug/app-debug.apk # 5. Launch app -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity # 6. Monitor logs (in separate terminal) adb logcat -s "DailyNotification" "Capacitor" "Console" @@ -360,7 +360,7 @@ adb start-server ```bash # Error: INSTALL_FAILED_UPDATE_INCOMPATIBLE # Solution: Uninstall existing app first -adb uninstall com.timesafari.dailynotification.test +adb uninstall org.timesafari.dailynotification.test adb install app/build/outputs/apk/debug/app-debug.apk # Error: INSTALL_FAILED_USER_RESTRICTED @@ -371,7 +371,7 @@ adb install app/build/outputs/apk/debug/app-debug.apk 1. **Check notification permissions:** ```bash - adb shell dumpsys notification | grep -A 10 "com.timesafari" + adb shell dumpsys notification | grep -A 10 "org.timesafari" ``` 2. **Check battery optimization:** @@ -390,7 +390,7 @@ adb install app/build/outputs/apk/debug/app-debug.apk 1. **Check if alarms are scheduled:** ```bash - adb shell dumpsys alarm | grep -A 10 "com.timesafari" + adb shell dumpsys alarm | grep -A 10 "org.timesafari" ``` 2. **Check Doze mode:** @@ -404,7 +404,7 @@ adb install app/build/outputs/apk/debug/app-debug.apk 3. **Check exact alarm permission (Android 12+):** ```bash - adb shell appops get com.timesafari.dailynotification.test SCHEDULE_EXACT_ALARM + adb shell appops get org.timesafari.dailynotification.test SCHEDULE_EXACT_ALARM ``` ### Build Failures @@ -468,7 +468,7 @@ adb -s ABC123DEF456 install -r app/build/outputs/apk/debug/app-debug.apk adb -s ABC123DEF456 logcat -s "DailyNotification" # Launch app on specific device -adb -s ABC123DEF456 shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb -s ABC123DEF456 shell am start -n org.timesafari.dailynotification.test/.MainActivity ``` ## Wireless ADB (Optional) diff --git a/docs/testing/QUICK_REFERENCE.md b/docs/testing/QUICK_REFERENCE.md index b2c43ce..b6595c4 100644 --- a/docs/testing/QUICK_REFERENCE.md +++ b/docs/testing/QUICK_REFERENCE.md @@ -7,7 +7,7 @@ ### Manual Testing ```bash # 1. Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # 2. Schedule notification (in app UI) # Tap "Test Notification" button @@ -36,13 +36,13 @@ python3 scripts/daily-notification-test.py -v ### App Management ```bash # Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Normal close (background) adb shell input keyevent KEYCODE_HOME # Force stop (kills app) -adb shell am force-stop com.timesafari.dailynotification +adb shell am force-stop org.timesafari.dailynotification # Check if running adb shell "ps | grep timesafari" @@ -54,7 +54,7 @@ adb shell "ps | grep timesafari" adb shell "dumpsys notification | grep -A5 -B5 timesafari" # Open notification settings -adb shell "am start -a android.settings.APP_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE com.timesafari.dailynotification" +adb shell "am start -a android.settings.APP_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE org.timesafari.dailynotification" # List notifications adb shell "cmd notification list" diff --git a/docs/testing/QUICK_REFERENCE_V2.md b/docs/testing/QUICK_REFERENCE_V2.md index c8270cb..131626c 100644 --- a/docs/testing/QUICK_REFERENCE_V2.md +++ b/docs/testing/QUICK_REFERENCE_V2.md @@ -15,7 +15,7 @@ ```bash # Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Check channel status adb shell "dumpsys notification | grep -A5 daily_default" @@ -37,7 +37,7 @@ adb shell "dumpsys notification | grep daily_default" adb shell "dumpsys notification | grep -A5 daily_default | grep importance" # Open channel settings -adb shell "am start -a android.settings.CHANNEL_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE com.timesafari.dailynotification -e android.provider.extra.CHANNEL_ID daily_default" +adb shell "am start -a android.settings.CHANNEL_NOTIFICATION_SETTINGS -e android.provider.extra.APP_PACKAGE org.timesafari.dailynotification -e android.provider.extra.CHANNEL_ID daily_default" ``` ### 3. PendingIntent & Exact Alarms Test @@ -50,7 +50,7 @@ adb shell "dumpsys alarm | grep -A10 -B5 timesafari" adb shell "dumpsys alarm | grep SCHEDULE_EXACT_ALARM" # Open exact alarm settings -adb shell "am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM -d package:com.timesafari.dailynotification" +adb shell "am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM -d package:org.timesafari.dailynotification" ``` ### 4. JIT Freshness Re-check Test @@ -75,11 +75,11 @@ adb logcat | grep -i "jit\|freshness\|stale" adb logcat -c # Launch app multiple times to test cooldown -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity sleep 2 -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity sleep 2 -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Check recovery logs adb logcat -d | grep -i "recovery.*requested.*app_startup" @@ -220,10 +220,10 @@ adb shell "dumpsys alarm | head -20" adb logcat -d | grep -i "recovery.*requested" # Check recovery state -adb shell "run-as com.timesafari.dailynotification ls -la /data/data/com.timesafari.dailynotification/shared_prefs/" +adb shell "run-as org.timesafari.dailynotification ls -la /data/data/org.timesafari.dailynotification/shared_prefs/" # Check boot receiver registration -adb shell "dumpsys package com.timesafari.dailynotification | grep -A5 -B5 receiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A5 -B5 receiver" ``` ### Debug JIT Freshness Issues diff --git a/docs/testing/REBOOT_PROCEDURE.md b/docs/testing/REBOOT_PROCEDURE.md index 422482f..e306771 100644 --- a/docs/testing/REBOOT_PROCEDURE.md +++ b/docs/testing/REBOOT_PROCEDURE.md @@ -42,7 +42,7 @@ This document provides a comprehensive procedure for testing notification recove 1. **Schedule Notification**: ```bash # Launch app - adb shell am start -n com.timesafari.dailynotification/.MainActivity + adb shell am start -n org.timesafari.dailynotification/.MainActivity ``` - Tap "Test Notification" button - Verify notification scheduled for 5 minutes from now @@ -156,7 +156,7 @@ This document provides a comprehensive procedure for testing notification recove set -e -APP_PACKAGE="com.timesafari.dailynotification" +APP_PACKAGE="org.timesafari.dailynotification" APP_ACTIVITY=".MainActivity" echo "🔄 Starting Reboot Recovery Test" @@ -260,7 +260,7 @@ import sys class RebootTester: def __init__(self): - self.package = "com.timesafari.dailynotification" + self.package = "org.timesafari.dailynotification" self.activity = f"{self.package}/.MainActivity" def run_command(self, command): @@ -364,7 +364,7 @@ adb logcat | grep -i "bootreceiver\|recovery" adb logcat -d | grep -i "bootreceiver\|recovery" # Check boot receiver registration -adb shell "dumpsys package com.timesafari.dailynotification | grep -A10 -B10 receiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A10 -B10 receiver" ``` ### Alarm Verification @@ -408,13 +408,13 @@ adb shell "dumpsys alarm | grep SCHEDULE_EXACT_ALARM" ```bash # Check boot receiver status -adb shell "dumpsys package com.timesafari.dailynotification | grep -A5 -B5 receiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A5 -B5 receiver" # Check recovery manager logs adb logcat -d | grep -i "rebootrecovery" # Check notification storage -adb shell "run-as com.timesafari.dailynotification ls -la /data/data/com.timesafari.dailynotification/shared_prefs/" +adb shell "run-as org.timesafari.dailynotification ls -la /data/data/org.timesafari.dailynotification/shared_prefs/" # Check alarm manager state adb shell "dumpsys alarm | head -20" diff --git a/docs/testing/REBOOT_STEPS.md b/docs/testing/REBOOT_STEPS.md index ca521dd..8eafa3c 100644 --- a/docs/testing/REBOOT_STEPS.md +++ b/docs/testing/REBOOT_STEPS.md @@ -13,7 +13,7 @@ Test that scheduled notifications survive device reboots and are properly restor ### **Step 1: Schedule Notification** ```bash # Launch app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity ``` - Tap **"Test Notification"** button - Verify message: **"Notification scheduled for [time]! Check your notification bar in 5 minutes."** @@ -101,10 +101,10 @@ BootReceiver: Error during boot recovery **Solutions**: ```bash # Check boot receiver registration -adb shell "dumpsys package com.timesafari.dailynotification | grep -A10 -B10 receiver" +adb shell "dumpsys package org.timesafari.dailynotification | grep -A10 -B10 receiver" # Check BOOT_COMPLETED permission -adb shell "dumpsys package com.timesafari.dailynotification | grep permission" +adb shell "dumpsys package org.timesafari.dailynotification | grep permission" ``` ### **Issue 2: Recovery Fails** @@ -112,7 +112,7 @@ adb shell "dumpsys package com.timesafari.dailynotification | grep permission" **Solutions**: ```bash # Check notification storage -adb shell "run-as com.timesafari.dailynotification ls -la /data/data/com.timesafari.dailynotification/shared_prefs/" +adb shell "run-as org.timesafari.dailynotification ls -la /data/data/org.timesafari.dailynotification/shared_prefs/" # Check alarm permissions adb shell "dumpsys alarm | grep SCHEDULE_EXACT_ALARM" @@ -150,7 +150,7 @@ adb shell "dumpsys deviceidle | grep timesafari" ### **One-Line Reboot Test:** ```bash # Schedule notification, reboot, and verify -adb shell am start -n com.timesafari.dailynotification/.MainActivity && echo "Schedule notification, then:" && read -p "Press Enter to reboot..." && adb reboot && sleep 120 && adb logcat -d | grep -i "bootreceiver\|recovery" +adb shell am start -n org.timesafari.dailynotification/.MainActivity && echo "Schedule notification, then:" && read -p "Press Enter to reboot..." && adb reboot && sleep 120 && adb logcat -d | grep -i "bootreceiver\|recovery" ``` ### **Check Recovery Status:** diff --git a/examples/native-fetcher-android.kt b/examples/native-fetcher-android.kt index 1c3370a..cc5e375 100644 --- a/examples/native-fetcher-android.kt +++ b/examples/native-fetcher-android.kt @@ -8,9 +8,9 @@ * @version 1.0.0 */ -package com.timesafari.notification +package org.timesafari.notification -import com.timesafari.dailynotification.* +import org.timesafari.dailynotification.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/examples/stale-data-ux.ts b/examples/stale-data-ux.ts index 561551a..61e1a8d 100644 --- a/examples/stale-data-ux.ts +++ b/examples/stale-data-ux.ts @@ -67,7 +67,7 @@ class AndroidStaleDataUX { private createRefreshIntent(): Record { // Create PendingIntent for refresh action return { - action: 'com.timesafari.dailynotification.REFRESH_DATA', + action: 'org.timesafari.dailynotification.REFRESH_DATA', flags: ['FLAG_UPDATE_CURRENT'] }; } @@ -75,7 +75,7 @@ class AndroidStaleDataUX { private createSettingsIntent(): Record { // Create PendingIntent for settings action return { - action: 'com.timesafari.dailynotification.OPEN_SETTINGS', + action: 'org.timesafari.dailynotification.OPEN_SETTINGS', flags: ['FLAG_UPDATE_CURRENT'] }; } diff --git a/ios/DailyNotificationPlugin.xcodeproj/project.pbxproj b/ios/DailyNotificationPlugin.xcodeproj/project.pbxproj index 31d66ed..b4fb19e 100644 --- a/ios/DailyNotificationPlugin.xcodeproj/project.pbxproj +++ b/ios/DailyNotificationPlugin.xcodeproj/project.pbxproj @@ -349,7 +349,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -373,7 +373,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -455,7 +455,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification.tests; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification.tests; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -472,7 +472,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification.tests; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification.tests; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/ios/Plugin/DailyNotificationBackgroundTaskManager.swift b/ios/Plugin/DailyNotificationBackgroundTaskManager.swift index 0481c74..bcc32f9 100644 --- a/ios/Plugin/DailyNotificationBackgroundTaskManager.swift +++ b/ios/Plugin/DailyNotificationBackgroundTaskManager.swift @@ -27,7 +27,7 @@ class DailyNotificationBackgroundTaskManager { // MARK: - Constants private static let TAG = "DailyNotificationBackgroundTaskManager" - private static let BACKGROUND_TASK_IDENTIFIER = "com.timesafari.dailynotification.prefetch" + private static let BACKGROUND_TASK_IDENTIFIER = "org.timesafari.dailynotification.prefetch" private static let PREFETCH_TIMEOUT_SECONDS: TimeInterval = 12.0 private static let TASK_EXPIRATION_SECONDS: TimeInterval = 30.0 @@ -55,7 +55,7 @@ class DailyNotificationBackgroundTaskManager { self.rollingWindow = rollingWindow // Configure URL session for prefetch requests - let config = URLSessionConfiguration.background(withIdentifier: "com.timesafari.dailynotification.prefetch") + let config = URLSessionConfiguration.background(withIdentifier: "org.timesafari.dailynotification.prefetch") config.timeoutIntervalForRequest = Self.PREFETCH_TIMEOUT_SECONDS config.timeoutIntervalForResource = Self.PREFETCH_TIMEOUT_SECONDS self.urlSession = URLSession(configuration: config) diff --git a/ios/Plugin/DailyNotificationBackgroundTaskTestHarness.swift b/ios/Plugin/DailyNotificationBackgroundTaskTestHarness.swift index d51a0fe..e7533ef 100644 --- a/ios/Plugin/DailyNotificationBackgroundTaskTestHarness.swift +++ b/ios/Plugin/DailyNotificationBackgroundTaskTestHarness.swift @@ -31,7 +31,7 @@ import os.log /// ```xml /// BGTaskSchedulerPermittedIdentifiers /// -/// com.timesafari.dailynotification.fetch +/// org.timesafari.dailynotification.fetch /// /// ``` /// @@ -42,15 +42,15 @@ class DailyNotificationBackgroundTaskTestHarness { // MARK: - Constants - static let prefetchTaskIdentifier = "com.timesafari.dailynotification.fetch" + static let prefetchTaskIdentifier = "org.timesafari.dailynotification.fetch" // MARK: - Structured Logging /// OSLog categories for structured logging (iOS 13.0+ compatible) - private static let pluginLog = OSLog(subsystem: "com.timesafari.dailynotification", category: "plugin") - private static let fetchLog = OSLog(subsystem: "com.timesafari.dailynotification", category: "fetch") - private static let schedulerLog = OSLog(subsystem: "com.timesafari.dailynotification", category: "scheduler") - private static let storageLog = OSLog(subsystem: "com.timesafari.dailynotification", category: "storage") + private static let pluginLog = OSLog(subsystem: "org.timesafari.dailynotification", category: "plugin") + private static let fetchLog = OSLog(subsystem: "org.timesafari.dailynotification", category: "fetch") + private static let schedulerLog = OSLog(subsystem: "org.timesafari.dailynotification", category: "scheduler") + private static let storageLog = OSLog(subsystem: "org.timesafari.dailynotification", category: "storage") /// Log telemetry snapshot for validation static func logTelemetrySnapshot(prefix: String = "DNP-") { @@ -262,7 +262,7 @@ class DailyNotificationBackgroundTaskTestHarness { class PrefetchOperation: Operation, @unchecked Sendable { var isFailed = false - private static let fetchLog = OSLog(subsystem: "com.timesafari.dailynotification", category: "fetch") + private static let fetchLog = OSLog(subsystem: "org.timesafari.dailynotification", category: "fetch") override func main() { if isCancelled { return } diff --git a/ios/Plugin/DailyNotificationPlugin.swift b/ios/Plugin/DailyNotificationPlugin.swift index f271e91..1c6cb8b 100644 --- a/ios/Plugin/DailyNotificationPlugin.swift +++ b/ios/Plugin/DailyNotificationPlugin.swift @@ -30,8 +30,8 @@ public class DailyNotificationPlugin: CAPPlugin { // Note: PersistenceController available for Phase 2+ CoreData integration if needed // Background task identifiers - private let fetchTaskIdentifier = "com.timesafari.dailynotification.fetch" - private let notifyTaskIdentifier = "com.timesafari.dailynotification.notify" + private let fetchTaskIdentifier = "org.timesafari.dailynotification.fetch" + private let notifyTaskIdentifier = "org.timesafari.dailynotification.notify" // Phase 1: Storage and Scheduler components var storage: DailyNotificationStorage? @@ -2150,7 +2150,7 @@ public class DailyNotificationPlugin: CAPPlugin { // which is required for Capacitor to discover and register the plugin @objc extension DailyNotificationPlugin: CAPBridgedPlugin { @objc public var identifier: String { - return "com.timesafari.dailynotification" + return "org.timesafari.dailynotification" } @objc public var jsName: String { diff --git a/ios/Plugin/DailyNotificationReactivationManager.swift b/ios/Plugin/DailyNotificationReactivationManager.swift index c296d4a..b07445b 100644 --- a/ios/Plugin/DailyNotificationReactivationManager.swift +++ b/ios/Plugin/DailyNotificationReactivationManager.swift @@ -915,8 +915,8 @@ class DailyNotificationReactivationManager { // Note: BGTaskScheduler doesn't provide a way to query registered task identifiers // We can only verify by attempting to schedule or by tracking registration ourselves // For now, we'll return that registration status cannot be verified programmatically - let fetchTaskIdentifier = "com.timesafari.dailynotification.fetch" - let notifyTaskIdentifier = "com.timesafari.dailynotification.notify" + let fetchTaskIdentifier = "org.timesafari.dailynotification.fetch" + let notifyTaskIdentifier = "org.timesafari.dailynotification.notify" return [ "available": true, diff --git a/ios/Plugin/DailyNotificationScheduler.swift b/ios/Plugin/DailyNotificationScheduler.swift index 46201d3..a6afd5b 100644 --- a/ios/Plugin/DailyNotificationScheduler.swift +++ b/ios/Plugin/DailyNotificationScheduler.swift @@ -45,7 +45,7 @@ class DailyNotificationScheduler { private let notificationCenter: UNUserNotificationCenter private var scheduledNotifications: Set = [] - private let schedulerQueue = DispatchQueue(label: "com.timesafari.dailynotification.scheduler", attributes: .concurrent) + private let schedulerQueue = DispatchQueue(label: "org.timesafari.dailynotification.scheduler", attributes: .concurrent) // TTL enforcement private weak var ttlEnforcer: DailyNotificationTTLEnforcer? diff --git a/ios/Plugin/DailyNotificationStorage.swift b/ios/Plugin/DailyNotificationStorage.swift index 726c437..59ff6d1 100644 --- a/ios/Plugin/DailyNotificationStorage.swift +++ b/ios/Plugin/DailyNotificationStorage.swift @@ -42,7 +42,7 @@ class DailyNotificationStorage { private let database: DailyNotificationDatabase private var notificationCache: [String: NotificationContent] = [:] private var notificationList: [NotificationContent] = [] - private let cacheQueue = DispatchQueue(label: "com.timesafari.dailynotification.storage.cache", attributes: .concurrent) + private let cacheQueue = DispatchQueue(label: "org.timesafari.dailynotification.storage.cache", attributes: .concurrent) // MARK: - Initialization diff --git a/ios/Plugin/Info.plist b/ios/Plugin/Info.plist index 4c2fc9e..aeb93c7 100644 --- a/ios/Plugin/Info.plist +++ b/ios/Plugin/Info.plist @@ -5,8 +5,8 @@ BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch - com.timesafari.dailynotification.notify + org.timesafari.dailynotification.fetch + org.timesafari.dailynotification.notify @@ -52,7 +52,7 @@ CFBundleIdentifier - com.timesafari.dailynotification + org.timesafari.dailynotification CFBundleShortVersionString diff --git a/ios/project.yml b/ios/project.yml index 4c7e84b..17987d5 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -1,6 +1,6 @@ name: DailyNotificationPlugin options: - bundleIdPrefix: com.timesafari + bundleIdPrefix: org.timesafari deploymentTarget: iOS: 13.0 schemes: @@ -36,7 +36,7 @@ targets: - path: Plugin settings: base: - PRODUCT_BUNDLE_IDENTIFIER: com.timesafari.dailynotification + PRODUCT_BUNDLE_IDENTIFIER: org.timesafari.dailynotification DEVELOPMENT_TEAM: "" # Add your team ID here dependencies: [] DailyNotificationPluginTests: @@ -48,5 +48,5 @@ targets: - target: DailyNotificationPlugin settings: base: - PRODUCT_BUNDLE_IDENTIFIER: com.timesafari.dailynotification.tests + PRODUCT_BUNDLE_IDENTIFIER: org.timesafari.dailynotification.tests DEVELOPMENT_TEAM: "" # Add your team ID here \ No newline at end of file diff --git a/plugins b/plugins index 9c4fcb6..34bc538 100644 --- a/plugins +++ b/plugins @@ -1,6 +1,6 @@ [ { "name": "DailyNotification", - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] diff --git a/scripts/build-ios-test-app.sh b/scripts/build-ios-test-app.sh index dae282a..4ccff46 100755 --- a/scripts/build-ios-test-app.sh +++ b/scripts/build-ios-test-app.sh @@ -426,7 +426,7 @@ build_ios_test_app() { # Uninstall existing app (if present) to ensure clean install log_step "Uninstalling existing app (if present)..." - APP_BUNDLE_ID="com.timesafari.dailynotification.test" + APP_BUNDLE_ID="org.timesafari.dailynotification.test" if xcrun simctl uninstall "$SIMULATOR_ID" "$APP_BUNDLE_ID" 2>&1; then log_info "Existing app uninstalled" else @@ -457,7 +457,7 @@ build_ios_test_app() { sleep 2 # Method 1: Direct launch (capture output to check for errors) - # Note: Bundle ID is com.timesafari.dailynotification.test + # Note: Bundle ID is org.timesafari.dailynotification.test log_info "Attempting to launch app..." LAUNCH_OUTPUT=$(xcrun simctl launch "$SIMULATOR_ID" "$APP_BUNDLE_ID" 2>&1) LAUNCH_EXIT_CODE=$? @@ -534,7 +534,7 @@ build_ios_test_app() { log_info "" log_info "To run on simulator manually:" log_info " xcrun simctl install booted \"$APP_PATH\"" - log_info " xcrun simctl launch booted com.timesafari.dailynotification.test" + log_info " xcrun simctl launch booted org.timesafari.dailynotification.test" fi else log_warn "Could not find built app in DerivedData" diff --git a/scripts/comprehensive-test-v2.sh b/scripts/comprehensive-test-v2.sh index 216f223..4d2c6ca 100755 --- a/scripts/comprehensive-test-v2.sh +++ b/scripts/comprehensive-test-v2.sh @@ -15,8 +15,8 @@ BLUE='\033[0;34m' NC='\033[0m' # No Color # Test configuration -APP_PACKAGE="com.timesafari.dailynotification" -APP_ACTIVITY="com.timesafari.dailynotification.MainActivity" +APP_PACKAGE="org.timesafari.dailynotification" +APP_ACTIVITY="org.timesafari.dailynotification.MainActivity" TEST_TIMEOUT=30 NOTIFICATION_DELAY=5 # 5 minutes for testing diff --git a/scripts/daily-notification-test.py b/scripts/daily-notification-test.py index fb09bd8..24a219e 100755 --- a/scripts/daily-notification-test.py +++ b/scripts/daily-notification-test.py @@ -27,7 +27,7 @@ class TestCase: error: Optional[str] = None class DailyNotificationTester: - def __init__(self, package: str = "com.timesafari.dailynotification", verbose: bool = False): + def __init__(self, package: str = "org.timesafari.dailynotification", verbose: bool = False): self.package = package self.activity = f"{package}/.MainActivity" self.verbose = verbose @@ -238,7 +238,7 @@ class DailyNotificationTester: def main(): parser = argparse.ArgumentParser(description="DailyNotification Plugin Test Suite") parser.add_argument("-v", "--verbose", action="store_true", help="Enable verbose output") - parser.add_argument("-p", "--package", default="com.timesafari.dailynotification", help="App package name") + parser.add_argument("-p", "--package", default="org.timesafari.dailynotification", help="App package name") parser.add_argument("-o", "--output", help="Output report to JSON file") parser.add_argument("--timeout", type=int, default=120, help="Test timeout in seconds") diff --git a/scripts/daily-notification-test.sh b/scripts/daily-notification-test.sh index 17ca17d..caac5ba 100755 --- a/scripts/daily-notification-test.sh +++ b/scripts/daily-notification-test.sh @@ -5,7 +5,7 @@ set -e # Configuration -APP_PACKAGE="com.timesafari.dailynotification" +APP_PACKAGE="org.timesafari.dailynotification" APP_ACTIVITY=".MainActivity" TEST_TIMEOUT=120 # 2 minutes LOG_TAG="DailyNotification" diff --git a/scripts/reboot-test-v2.sh b/scripts/reboot-test-v2.sh index 1e4b4f9..3a75ee9 100755 --- a/scripts/reboot-test-v2.sh +++ b/scripts/reboot-test-v2.sh @@ -3,7 +3,7 @@ set -e -APP_PACKAGE="com.timesafari.dailynotification" +APP_PACKAGE="org.timesafari.dailynotification" APP_ACTIVITY=".MainActivity" echo "🔄 DailyNotification Reboot Test Suite v2.0" diff --git a/scripts/reboot-test.sh b/scripts/reboot-test.sh index 2f68399..c588042 100755 --- a/scripts/reboot-test.sh +++ b/scripts/reboot-test.sh @@ -5,7 +5,7 @@ set -e # Configuration -APP_PACKAGE="com.timesafari.dailynotification" +APP_PACKAGE="org.timesafari.dailynotification" APP_ACTIVITY=".MainActivity" BOOT_WAIT_TIME=60 # Wait 60 seconds for boot completion RECOVERY_TIMEOUT=30 # Wait 30 seconds for recovery diff --git a/scripts/setup-ios-test-app.sh b/scripts/setup-ios-test-app.sh index 079c649..03320e1 100755 --- a/scripts/setup-ios-test-app.sh +++ b/scripts/setup-ios-test-app.sh @@ -112,7 +112,7 @@ setup_ios_test_app() { log_step "Creating capacitor.config.json..." cat > "capacitor.config.json" << 'EOF' { - "appId": "com.timesafari.dailynotification.test", + "appId": "org.timesafari.dailynotification.test", "appName": "DailyNotification Test App", "webDir": "App/App/Public", "server": { diff --git a/scripts/validate-ios-logs.sh b/scripts/validate-ios-logs.sh index ca2f1f3..b4f705f 100755 --- a/scripts/validate-ios-logs.sh +++ b/scripts/validate-ios-logs.sh @@ -13,7 +13,7 @@ # grep -E "\[DNP-(FETCH|SCHEDULER|PLUGIN)\]" device.log | ./scripts/validate-ios-logs.sh # # # From Xcode console output -# xcrun simctl spawn booted log stream --predicate 'subsystem == "com.timesafari.dailynotification"' | ./scripts/validate-ios-logs.sh +# xcrun simctl spawn booted log stream --predicate 'subsystem == "org.timesafari.dailynotification"' | ./scripts/validate-ios-logs.sh # # Author: Matthew Raymer # Date: 2025-11-15 diff --git a/src/__tests__/platform-config.test.ts b/src/__tests__/platform-config.test.ts index d74429f..38eec98 100644 --- a/src/__tests__/platform-config.test.ts +++ b/src/__tests__/platform-config.test.ts @@ -58,7 +58,7 @@ describe('Platform Configuration', () => { test('should get battery optimization settings', () => { const batterySettings = androidConfig.getBatteryOptimizationConfig(); - expect(batterySettings.exemptPackages).toContain('com.timesafari.dailynotification'); + expect(batterySettings.exemptPackages).toContain('org.timesafari.dailynotification'); expect(batterySettings.whitelistRequestMessage).toBeDefined(); expect(batterySettings.optimizationCheckInterval).toBeGreaterThan(0); }); @@ -159,8 +159,8 @@ describe('Platform Configuration', () => { test('should get background tasks', () => { const backgroundTasks = iosConfig.getAllBackgroundTasks(); expect(backgroundTasks).toHaveLength(2); - expect(backgroundTasks[0].identifier).toBe('com.timesafari.dailynotification.fetch'); - expect(backgroundTasks[1].identifier).toBe('com.timesafari.dailynotification.notify'); + expect(backgroundTasks[0].identifier).toBe('org.timesafari.dailynotification.fetch'); + expect(backgroundTasks[1].identifier).toBe('org.timesafari.dailynotification.notify'); }); test('should update configuration', () => { diff --git a/src/android/timesafari-android-config.ts b/src/android/timesafari-android-config.ts index 4bded77..2205dba 100644 --- a/src/android/timesafari-android-config.ts +++ b/src/android/timesafari-android-config.ts @@ -218,7 +218,7 @@ export const DEFAULT_TIMESAFARI_ANDROID_CONFIG: TimeSafariAndroidConfig = { ], batteryOptimization: { - exemptPackages: ['com.timesafari.dailynotification'], + exemptPackages: ['org.timesafari.dailynotification'], whitelistRequestMessage: 'TimeSafari needs to run in the background to deliver your daily community updates and notifications. Please whitelist TimeSafari from battery optimization.', optimizationCheckInterval: 60, // 1 hour fallbackBehavior: 'graceful' diff --git a/src/ios/timesafari-ios-config.ts b/src/ios/timesafari-ios-config.ts index 7e9918b..d0cb7ce 100644 --- a/src/ios/timesafari-ios-config.ts +++ b/src/ios/timesafari-ios-config.ts @@ -326,7 +326,7 @@ export const DEFAULT_TIMESAFARI_IOS_CONFIG: TimeSafariIOSConfig = { backgroundTasks: [ { - identifier: 'com.timesafari.dailynotification.fetch', + identifier: 'org.timesafari.dailynotification.fetch', name: 'TimeSafari Content Fetch', description: 'Fetch daily community content and project updates', estimatedDuration: 30, @@ -335,7 +335,7 @@ export const DEFAULT_TIMESAFARI_IOS_CONFIG: TimeSafariIOSConfig = { priority: 'default' }, { - identifier: 'com.timesafari.dailynotification.notify', + identifier: 'org.timesafari.dailynotification.notify', name: 'TimeSafari Notification Delivery', description: 'Deliver scheduled notifications to user', estimatedDuration: 10, diff --git a/test-apps/BUILD_PROCESS.md b/test-apps/BUILD_PROCESS.md index ea8c2ab..769223a 100644 --- a/test-apps/BUILD_PROCESS.md +++ b/test-apps/BUILD_PROCESS.md @@ -68,7 +68,7 @@ adb devices adb install -r ./app/build/outputs/apk/debug/app-debug.apk # Now start the app -adb shell am start -n com.timesafari.dailynotification/.MainActivity +adb shell am start -n org.timesafari.dailynotification/.MainActivity # Build release APK ./gradlew assembleRelease @@ -218,7 +218,7 @@ Should contain: [ { "name": "DailyNotification", - "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" + "classpath": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] ``` diff --git a/test-apps/android-test-app/alarm-test-lib.sh b/test-apps/android-test-app/alarm-test-lib.sh index ddd8b3f..a01eae8 100644 --- a/test-apps/android-test-app/alarm-test-lib.sh +++ b/test-apps/android-test-app/alarm-test-lib.sh @@ -21,7 +21,7 @@ # --- Config Defaults (can be overridden before sourcing) --- -: "${APP_ID:=com.timesafari.dailynotification}" +: "${APP_ID:=org.timesafari.dailynotification}" : "${APK_PATH:=./app/build/outputs/apk/debug/app-debug.apk}" : "${ADB_BIN:=adb}" @@ -123,7 +123,7 @@ print(json.dumps(event)) # Send event via ADB broadcast adb_broadcast_event() { local payload="$1" - local action="com.timesafari.dailynotification.TEST_EVENT" + local action="org.timesafari.dailynotification.TEST_EVENT" # Escape payload for shell (single quotes are safest) # Replace single quotes with '\'' (end quote, escaped quote, start quote) @@ -469,14 +469,14 @@ show_alarms() { } # Plugin-specific alarm action (must match AndroidManifest.xml) -PLUGIN_ALARM_ACTION="com.timesafari.daily.NOTIFICATION" +PLUGIN_ALARM_ACTION="org.timesafari.daily.NOTIFICATION" get_plugin_alarm_count() { # Returns count of ONLY the plugin's NOTIFICATION alarms (not prefetch - that uses WorkManager) # Expected: 1 notification alarm per daily schedule # # This function counts ALARM_CLOCK wake alarms (RTC_WAKEUP) tagged as: - # tag=*walarm*:com.timesafari.daily.NOTIFICATION + # tag=*walarm*:org.timesafari.daily.NOTIFICATION # # Uses deduplicating parser to avoid double-counting the same alarm that appears in both: # - Main alarm list @@ -487,7 +487,7 @@ get_plugin_alarm_count() { # Checks for app package AND action string anywhere in the block (they appear on different lines). local count app_id action app_id="$APP_ID" - action="com.timesafari.daily.NOTIFICATION" + action="org.timesafari.daily.NOTIFICATION" count="$($ADB_BIN shell dumpsys alarm 2>/dev/null | awk -v app="$app_id" -v action="$action" ' BEGIN { in_block = 0 diff --git a/test-apps/android-test-app/app/build.gradle b/test-apps/android-test-app/app/build.gradle index f66ec83..64fe9fa 100644 --- a/test-apps/android-test-app/app/build.gradle +++ b/test-apps/android-test-app/app/build.gradle @@ -1,10 +1,10 @@ apply plugin: 'com.android.application' android { - namespace "com.timesafari.dailynotification" + namespace "org.timesafari.dailynotification" compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { - applicationId "com.timesafari.dailynotification" + applicationId "org.timesafari.dailynotification" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 diff --git a/test-apps/android-test-app/app/proguard-rules.pro b/test-apps/android-test-app/app/proguard-rules.pro index f9eba7c..25761da 100644 --- a/test-apps/android-test-app/app/proguard-rules.pro +++ b/test-apps/android-test-app/app/proguard-rules.pro @@ -32,58 +32,58 @@ } # Keep DailyNotification plugin classes --keep class com.timesafari.dailynotification.** { *; } +-keep class org.timesafari.dailynotification.** { *; } # Keep plugin method names and signatures --keepclassmembers class com.timesafari.dailynotification.DailyNotificationPlugin { +-keepclassmembers class org.timesafari.dailynotification.DailyNotificationPlugin { public *; } # Keep all plugin manager classes --keep class com.timesafari.dailynotification.*Manager { *; } --keep class com.timesafari.dailynotification.*Storage { *; } --keep class com.timesafari.dailynotification.*Receiver { *; } +-keep class org.timesafari.dailynotification.*Manager { *; } +-keep class org.timesafari.dailynotification.*Storage { *; } +-keep class org.timesafari.dailynotification.*Receiver { *; } # Keep Room database classes --keep class com.timesafari.dailynotification.storage.** { *; } --keep class com.timesafari.dailynotification.database.** { *; } +-keep class org.timesafari.dailynotification.storage.** { *; } +-keep class org.timesafari.dailynotification.database.** { *; } # Keep error handling classes --keep class com.timesafari.dailynotification.*Error* { *; } --keep class com.timesafari.dailynotification.*Exception* { *; } +-keep class org.timesafari.dailynotification.*Error* { *; } +-keep class org.timesafari.dailynotification.*Exception* { *; } # Keep JWT and ETag managers --keep class com.timesafari.dailynotification.*JWT* { *; } --keep class com.timesafari.dailynotification.*ETag* { *; } +-keep class org.timesafari.dailynotification.*JWT* { *; } +-keep class org.timesafari.dailynotification.*ETag* { *; } # Keep performance and optimization classes --keep class com.timesafari.dailynotification.*Performance* { *; } --keep class com.timesafari.dailynotification.*Optimizer* { *; } +-keep class org.timesafari.dailynotification.*Performance* { *; } +-keep class org.timesafari.dailynotification.*Optimizer* { *; } # Keep rolling window and TTL classes --keep class com.timesafari.dailynotification.*Rolling* { *; } --keep class com.timesafari.dailynotification.*TTL* { *; } +-keep class org.timesafari.dailynotification.*Rolling* { *; } +-keep class org.timesafari.dailynotification.*TTL* { *; } # Keep exact alarm and reboot recovery classes --keep class com.timesafari.dailynotification.*Exact* { *; } --keep class com.timesafari.dailynotification.*Reboot* { *; } --keep class com.timesafari.dailynotification.*Recovery* { *; } +-keep class org.timesafari.dailynotification.*Exact* { *; } +-keep class org.timesafari.dailynotification.*Reboot* { *; } +-keep class org.timesafari.dailynotification.*Recovery* { *; } # Keep enhanced fetcher classes --keep class com.timesafari.dailynotification.*Enhanced* { *; } --keep class com.timesafari.dailynotification.*Fetcher* { *; } +-keep class org.timesafari.dailynotification.*Enhanced* { *; } +-keep class org.timesafari.dailynotification.*Fetcher* { *; } # Keep migration classes --keep class com.timesafari.dailynotification.*Migration* { *; } +-keep class org.timesafari.dailynotification.*Migration* { *; } # Keep channel manager --keep class com.timesafari.dailynotification.ChannelManager { *; } +-keep class org.timesafari.dailynotification.ChannelManager { *; } # Keep permission manager --keep class com.timesafari.dailynotification.PermissionManager { *; } +-keep class org.timesafari.dailynotification.PermissionManager { *; } # Keep scheduler classes --keep class com.timesafari.dailynotification.*Scheduler* { *; } +-keep class org.timesafari.dailynotification.*Scheduler* { *; } # ============================================================================= # Android System Classes diff --git a/test-apps/android-test-app/app/src/androidTest/java/com/timesafari/dailynotification/ExampleInstrumentedTest.java b/test-apps/android-test-app/app/src/androidTest/java/org/timesafari/dailynotification/ExampleInstrumentedTest.java similarity index 86% rename from test-apps/android-test-app/app/src/androidTest/java/com/timesafari/dailynotification/ExampleInstrumentedTest.java rename to test-apps/android-test-app/app/src/androidTest/java/org/timesafari/dailynotification/ExampleInstrumentedTest.java index d9c5e49..97c9f44 100644 --- a/test-apps/android-test-app/app/src/androidTest/java/com/timesafari/dailynotification/ExampleInstrumentedTest.java +++ b/test-apps/android-test-app/app/src/androidTest/java/org/timesafari/dailynotification/ExampleInstrumentedTest.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import static org.junit.Assert.*; @@ -21,6 +21,6 @@ public class ExampleInstrumentedTest { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.timesafari.dailynotification", appContext.getPackageName()); + assertEquals("org.timesafari.dailynotification", appContext.getPackageName()); } } diff --git a/test-apps/android-test-app/app/src/main/AndroidManifest.xml b/test-apps/android-test-app/app/src/main/AndroidManifest.xml index c6cf9d2..e881dbf 100644 --- a/test-apps/android-test-app/app/src/main/AndroidManifest.xml +++ b/test-apps/android-test-app/app/src/main/AndroidManifest.xml @@ -27,23 +27,23 @@ - + diff --git a/test-apps/android-test-app/app/src/main/assets/capacitor.config.json b/test-apps/android-test-app/app/src/main/assets/capacitor.config.json index 012f498..2b9c812 100644 --- a/test-apps/android-test-app/app/src/main/assets/capacitor.config.json +++ b/test-apps/android-test-app/app/src/main/assets/capacitor.config.json @@ -1,5 +1,5 @@ { - "appId": "com.timesafari.dailynotification", + "appId": "org.timesafari.dailynotification", "appName": "DailyNotification Test App", "webDir": "www", "server": { diff --git a/test-apps/android-test-app/app/src/main/assets/capacitor.plugins.json b/test-apps/android-test-app/app/src/main/assets/capacitor.plugins.json index 743c924..2d5c166 100644 --- a/test-apps/android-test-app/app/src/main/assets/capacitor.plugins.json +++ b/test-apps/android-test-app/app/src/main/assets/capacitor.plugins.json @@ -1,10 +1,10 @@ [ { "name": "DailyNotification", - "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" + "classpath": "org.timesafari.dailynotification.DailyNotificationPlugin" }, { "name": "TestEvents", - "classpath": "com.timesafari.dailynotification.TestEventsPlugin" + "classpath": "org.timesafari.dailynotification.TestEventsPlugin" } ] diff --git a/test-apps/android-test-app/app/src/main/assets/public/plugins b/test-apps/android-test-app/app/src/main/assets/public/plugins index 9c4fcb6..34bc538 100644 --- a/test-apps/android-test-app/app/src/main/assets/public/plugins +++ b/test-apps/android-test-app/app/src/main/assets/public/plugins @@ -1,6 +1,6 @@ [ { "name": "DailyNotification", - "class": "com.timesafari.dailynotification.DailyNotificationPlugin" + "class": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] diff --git a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/DemoNativeFetcher.java b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/DemoNativeFetcher.java similarity index 94% rename from test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/DemoNativeFetcher.java rename to test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/DemoNativeFetcher.java index 7418077..4a5e625 100644 --- a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/DemoNativeFetcher.java +++ b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/DemoNativeFetcher.java @@ -8,13 +8,13 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.util.Log; import androidx.annotation.NonNull; -import com.timesafari.dailynotification.FetchContext; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; -import com.timesafari.dailynotification.NotificationContent; +import org.timesafari.dailynotification.FetchContext; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.NotificationContent; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/MainActivity.java b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/MainActivity.java similarity index 85% rename from test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/MainActivity.java rename to test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/MainActivity.java index cef4bad..c49ef99 100644 --- a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/MainActivity.java +++ b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/MainActivity.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import com.getcapacitor.BridgeActivity; import android.os.Bundle; diff --git a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/PluginApplication.java b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/PluginApplication.java similarity index 84% rename from test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/PluginApplication.java rename to test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/PluginApplication.java index 42e7657..db04aed 100644 --- a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/PluginApplication.java +++ b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/PluginApplication.java @@ -8,12 +8,12 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.app.Application; import android.util.Log; -import com.timesafari.dailynotification.DailyNotificationPlugin; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.DailyNotificationPlugin; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; /** * Application class that registers native fetcher for plugin demo app diff --git a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/TestEventsPlugin.java b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/TestEventsPlugin.java similarity index 94% rename from test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/TestEventsPlugin.java rename to test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/TestEventsPlugin.java index 79aec91..3bfb71e 100644 --- a/test-apps/android-test-app/app/src/main/java/com/timesafari/dailynotification/TestEventsPlugin.java +++ b/test-apps/android-test-app/app/src/main/java/org/timesafari/dailynotification/TestEventsPlugin.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import android.content.BroadcastReceiver; import android.content.Context; @@ -20,14 +20,14 @@ import com.getcapacitor.annotation.CapacitorPlugin; * * Usage from shell: * adb shell am broadcast \ - * -a com.timesafari.dailynotification.TEST_EVENT \ + * -a org.timesafari.dailynotification.TEST_EVENT \ * --es payload '{"version":"testevent.v1","ts":"...","type":"step_start",...}' */ @CapacitorPlugin(name = "TestEvents") public class TestEventsPlugin extends Plugin { private static final String TAG = "TestEventsPlugin"; - private static final String BROADCAST_ACTION = "com.timesafari.dailynotification.TEST_EVENT"; + private static final String BROADCAST_ACTION = "org.timesafari.dailynotification.TEST_EVENT"; private static final String EXTRA_PAYLOAD = "payload"; private BroadcastReceiver testEventReceiver; diff --git a/test-apps/android-test-app/app/src/main/res/values/strings.xml b/test-apps/android-test-app/app/src/main/res/values/strings.xml index 414ed79..72a3fd7 100644 --- a/test-apps/android-test-app/app/src/main/res/values/strings.xml +++ b/test-apps/android-test-app/app/src/main/res/values/strings.xml @@ -2,6 +2,6 @@ DailyNotificationPlugin DailyNotificationPlugin - com.timesafari.dailynotification - com.timesafari.dailynotification + org.timesafari.dailynotification + org.timesafari.dailynotification diff --git a/test-apps/android-test-app/app/src/test/java/com/timesafari/dailynotification/ExampleUnitTest.java b/test-apps/android-test-app/app/src/test/java/org/timesafari/dailynotification/ExampleUnitTest.java similarity index 89% rename from test-apps/android-test-app/app/src/test/java/com/timesafari/dailynotification/ExampleUnitTest.java rename to test-apps/android-test-app/app/src/test/java/org/timesafari/dailynotification/ExampleUnitTest.java index 9e03db9..b67ea2c 100644 --- a/test-apps/android-test-app/app/src/test/java/com/timesafari/dailynotification/ExampleUnitTest.java +++ b/test-apps/android-test-app/app/src/test/java/org/timesafari/dailynotification/ExampleUnitTest.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import static org.junit.Assert.*; diff --git a/test-apps/android-test-app/docs/PHASE1_TEST0_GOLDEN.md b/test-apps/android-test-app/docs/PHASE1_TEST0_GOLDEN.md index 4c87b69..9dad261 100644 --- a/test-apps/android-test-app/docs/PHASE1_TEST0_GOLDEN.md +++ b/test-apps/android-test-app/docs/PHASE1_TEST0_GOLDEN.md @@ -75,7 +75,7 @@ This document captures a **golden baseline** for **Phase 1 – TEST 0: Daily Rol ### 4.2. Notification Alarm Details (After Scheduling) ```text â„šī¸ Notification alarm details: - tag=*walarm*:com.timesafari.daily.NOTIFICATION + tag=*walarm*:org.timesafari.daily.NOTIFICATION type=RTC_WAKEUP origWhen=2025-12-04 09:23:00.000 window=0 exactAllowReason=policy_permission repeatInterval=0 count=0 flags=0x3 policyWhenElapsed: requester=+3m34s315ms app_standby=-10s456ms device_idle=-- battery_saver=-- ``` @@ -120,20 +120,20 @@ Expected state after rollover: ### 6.1. Representative Snippet ```text -RTC_WAKEUP #: Alarm{ type 0 origWhen whenElapsed ... com.timesafari.dailynotification} - tag=*walarm*:com.timesafari.daily.NOTIFICATION +RTC_WAKEUP #: Alarm{ type 0 origWhen whenElapsed ... org.timesafari.dailynotification} + tag=*walarm*:org.timesafari.daily.NOTIFICATION type=RTC_WAKEUP origWhen=2025-12-05 09:23:00.000 ... ... -Next wake from idle: Alarm{ type 0 origWhen ... com.timesafari.dailynotification} - tag=*walarm*:com.timesafari.daily.NOTIFICATION +Next wake from idle: Alarm{ type 0 origWhen ... org.timesafari.dailynotification} + tag=*walarm*:org.timesafari.daily.NOTIFICATION ``` ### 6.2. Key Observations - There should be **exactly one unique alarm handle** for the plugin (the handle will differ between runs). - It can appear both in the main list and in **"Next wake from idle"**, but counted as **one** alarm (deduplication by alarm handle). -- `tag` must be `*walarm*:com.timesafari.daily.NOTIFICATION`. +- `tag` must be `*walarm*:org.timesafari.daily.NOTIFICATION`. - `type` must be `RTC_WAKEUP`. - `origWhen` should be **tomorrow** at the same time-of-day as the scheduled notification (e.g., `2025-12-05 09:23:00.000` if scheduled for `2025-12-04 09:23:00.000`). @@ -147,7 +147,7 @@ Next wake from idle: Alarm{ type 0 origWhen ... com.timesafa DNP-SCHEDULE: Scheduling next daily alarm: id=daily_..., nextRun=2025-12-04 09:23:00, source=TEST_NOTIFICATION DNP-NOTIFY: Stored notification content in database: id=daily_... DNP-NOTIFY: Scheduling alarm: triggerTime=2025-12-04 09:23:00, ... -DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=com.timesafari.daily.NOTIFICATION, ... +DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=org.timesafari.daily.NOTIFICATION, ... ``` ### 7.2. Rollover on Fire @@ -156,7 +156,7 @@ DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=com.timesafari.da DNP-SCHEDULE: Scheduling next daily alarm: id=daily_rollover_..., nextRun=2025-12-05 09:23:00, source=ROLLOVER_ON_FIRE DNP-NOTIFY: Stored notification content in database: id=notify_... DNP-NOTIFY: Scheduling alarm: triggerTime=2025-12-05 09:23:00, ... -DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=com.timesafari.daily.NOTIFICATION, ... +DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=org.timesafari.daily.NOTIFICATION, ... ``` ### 7.3. Critical Requirements @@ -184,7 +184,7 @@ A run of TEST 0 is a **PASS** if all of the following are true: - [ ] **After rollover:** Active Schedules: Yes; Next Notification: *tomorrow* at the same time. ### `dumpsys alarm` -- [ ] Exactly one `RTC_WAKEUP` alarm with `tag=*walarm*:com.timesafari.daily.NOTIFICATION` for **tomorrow**. +- [ ] Exactly one `RTC_WAKEUP` alarm with `tag=*walarm*:org.timesafari.daily.NOTIFICATION` for **tomorrow**. - [ ] Same alarm handle may appear under "Next wake from idle", but no second distinct handle. - [ ] `origWhen` timestamp is exactly 24 hours after the initial scheduled time. diff --git a/test-apps/android-test-app/docs/PHASE1_TEST1_GOLDEN.md b/test-apps/android-test-app/docs/PHASE1_TEST1_GOLDEN.md index 83fd463..031a76d 100644 --- a/test-apps/android-test-app/docs/PHASE1_TEST1_GOLDEN.md +++ b/test-apps/android-test-app/docs/PHASE1_TEST1_GOLDEN.md @@ -49,7 +49,7 @@ This golden run documents a **known-good execution** on 2025-12-04. ./app/build/outputs/apk/debug/app-debug.apk ``` -* **App ID:** `com.timesafari.dailynotification` +* **App ID:** `org.timesafari.dailynotification` > **Note:** Device/emulator model & API level can be added here later if desired. @@ -93,7 +93,7 @@ This section captures the **actual** sequence for the golden run. * Verified **1** plugin alarm exists in AlarmManager. * Confirmed alarm details (time, tag, type). * Confirmed scheduling logs with `source=TEST_NOTIFICATION`. -10. Step 4: Performed **force-stop** via `adb shell am force-stop com.timesafari.dailynotification`. +10. Step 4: Performed **force-stop** via `adb shell am force-stop org.timesafari.dailynotification`. 11. Step 5 (post-FS verify): * Verified plugin alarms = **0** (force-stop cleared alarms). 12. Step 6: Relaunched app (cold start). @@ -145,8 +145,8 @@ These are the **critical excerpts** from the test harness output for a passing T â„šī¸ System/other alarms: 19 (for context) ✅ ✅ Single plugin alarm confirmed in AlarmManager (one per day) â„šī¸ Alarm details: - RTC_WAKEUP #4: Alarm{161cd2b type 0 origWhen 1764842100000 whenElapsed 13009441 com.timesafari.dailynotification} - tag=*walarm*:com.timesafari.daily.NOTIFICATION + RTC_WAKEUP #4: Alarm{161cd2b type 0 origWhen 1764842100000 whenElapsed 13009441 org.timesafari.dailynotification} + tag=*walarm*:org.timesafari.daily.NOTIFICATION type=RTC_WAKEUP origWhen=2025-12-04 09:55:00.000 window=0 exactAllowReason=policy_permission repeatInterval=0 count=0 flags=0x3 policyWhenElapsed: requester=+3m4s281ms app_standby=-6s566ms device_idle=-- battery_saver=-- -- @@ -154,7 +154,7 @@ These are the **critical excerpts** from the test harness output for a passing T â„šī¸ Checking logs for scheduling confirmation... 12-04 09:51:49.150 6803 6867 W DNP-SCHEDULE: Cancelling existing alarm before rescheduling: requestCode=3454, scheduleId=daily_1764841909137, source=TEST_NOTIFICATION 12-04 09:51:49.151 6803 6867 I DNP-NOTIFY: Scheduling alarm: triggerTime=2025-12-04 09:55:00, delayMs=190849, requestCode=3454, scheduleId=daily_1764841909137 -12-04 09:51:49.152 6803 6867 I DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=com.timesafari.daily.NOTIFICATION, triggerTime=1764842100000, requestCode=3454, scheduleId=daily_1764841909137, source=TEST_NOTIFICATION, pendingIntentHash=267839060, showIntentHash=256236029 +12-04 09:51:49.152 6803 6867 I DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=org.timesafari.daily.NOTIFICATION, triggerTime=1764842100000, requestCode=3454, scheduleId=daily_1764841909137, source=TEST_NOTIFICATION, pendingIntentHash=267839060, showIntentHash=256236029 12-04 09:51:49.153 6803 6867 I DNP-NOTIFY: Alarm clock scheduled (setAlarmClock): triggerAt=1764842100000, requestCode=3454 ``` @@ -163,7 +163,7 @@ These are the **critical excerpts** from the test harness output for a passing T ```text → Step 4: Force-stopping app (clears all alarms)... âš ī¸ Force-stop will clear ALL alarms from AlarmManager -â„šī¸ Executing: adb shell am force-stop com.timesafari.dailynotification +â„šī¸ Executing: adb shell am force-stop org.timesafari.dailynotification â„šī¸ Forcing stop of app process... ✅ Force stop issued → Step 5: Verifying alarms are MISSING from AlarmManager (AFTER force-stop)... @@ -180,7 +180,7 @@ These are the **critical excerpts** from the test harness output for a passing T â„šī¸ Clearing logcat buffer... ✅ Logs cleared â„šī¸ Launching app... -Starting: Intent { cmp=com.timesafari.dailynotification/.MainActivity } +Starting: Intent { cmp=org.timesafari.dailynotification/.MainActivity } ✅ App launched → Step 7: Verifying recovery rebuilt alarms from database... â„šī¸ Plugin alarms after recovery: 1 (expected: 1) @@ -224,8 +224,8 @@ Final summary: * Example block (shape, not necessarily exact handle): ```text -RTC_WAKEUP #4: Alarm{161cd2b type 0 origWhen 1764842100000 whenElapsed 13009441 com.timesafari.dailynotification} - tag=*walarm*:com.timesafari.daily.NOTIFICATION +RTC_WAKEUP #4: Alarm{161cd2b type 0 origWhen 1764842100000 whenElapsed 13009441 org.timesafari.dailynotification} + tag=*walarm*:org.timesafari.daily.NOTIFICATION type=RTC_WAKEUP origWhen=2025-12-04 09:55:00.000 window=0 exactAllowReason=policy_permission repeatInterval=0 count=0 flags=0x3 policyWhenElapsed: requester=+3m4s281ms app_standby=-6s566ms device_idle=-- battery_saver=-- ``` @@ -233,7 +233,7 @@ RTC_WAKEUP #4: Alarm{161cd2b type 0 origWhen 1764842100000 whenElapsed 13009441 ### 5.2 After Force-Stop * **Plugin alarm count:** 0 -* No `*walarm*:com.timesafari.daily.NOTIFICATION` entries should appear. +* No `*walarm*:org.timesafari.daily.NOTIFICATION` entries should appear. ### 5.3 After Recovery @@ -252,7 +252,7 @@ For a passing run, look for: ```text DNP-NOTIFY: Scheduling alarm: triggerTime=2025-12-04 09:55:00, delayMs=..., requestCode=3454, scheduleId=daily_1764841909137 - DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=com.timesafari.daily.NOTIFICATION, triggerTime=1764842100000, requestCode=3454, scheduleId=daily_1764841909137, source=TEST_NOTIFICATION, ... + DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=org.timesafari.daily.NOTIFICATION, triggerTime=1764842100000, requestCode=3454, scheduleId=daily_1764841909137, source=TEST_NOTIFICATION, ... ``` * **Recovery (after FS + relaunch):** @@ -287,7 +287,7 @@ A TEST 1 run is a **PASS** if all of the following are true: * **Pre-force-stop:** * Plugin alarm count = **1**. - * Alarm is tagged `*walarm*:com.timesafari.daily.NOTIFICATION`. + * Alarm is tagged `*walarm*:org.timesafari.daily.NOTIFICATION`. * `triggerTime` and `origWhen` are consistent (e.g. `2025-12-04 09:55:00`, `1764842100000`). * `scheduleId` looks like `daily_` (here: `daily_1764841909137`). * Logs show `source=TEST_NOTIFICATION`. diff --git a/test-apps/android-test-app/test-phase1.sh b/test-apps/android-test-app/test-phase1.sh index 7f0b9f3..13c6234 100755 --- a/test-apps/android-test-app/test-phase1.sh +++ b/test-apps/android-test-app/test-phase1.sh @@ -739,7 +739,7 @@ main() { ok "Single notification alarm scheduled (one per day)" local alarm_details - alarm_details="$($ADB_BIN shell dumpsys alarm | grep -A 3 "com.timesafari.dailynotification" | grep -A 3 "com.timesafari.daily.NOTIFICATION" | head -10)" + alarm_details="$($ADB_BIN shell dumpsys alarm | grep -A 3 "org.timesafari.dailynotification" | grep -A 3 "org.timesafari.daily.NOTIFICATION" | head -10)" if [ -n "${alarm_details}" ]; then info "Notification alarm details:" echo "${alarm_details}" | head -5 @@ -816,7 +816,7 @@ main() { local rollover_verified=false if [ "${post_rollover_count}" -eq "1" ] 2>/dev/null; then local post_alarm_details - post_alarm_details="$($ADB_BIN shell dumpsys alarm | grep -A 3 "com.timesafari.dailynotification" | grep -A 3 "com.timesafari.daily.NOTIFICATION" | head -10)" + post_alarm_details="$($ADB_BIN shell dumpsys alarm | grep -A 3 "org.timesafari.dailynotification" | grep -A 3 "org.timesafari.daily.NOTIFICATION" | head -10)" if [ -n "${post_alarm_details}" ]; then # Extract post-rollover alarm time (normalize seconds to 00 for comparison) post_rollover_alarm_time=$(echo "${post_alarm_details}" | grep -oE "origWhen=[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}" | head -1 | sed 's/origWhen=//' | sed 's/:[0-9][0-9]$/:00/') @@ -871,7 +871,7 @@ main() { else warn "No rollover logs found - checking if notification fired at all..." # Check for any notification display logs - local notification_logs=$($ADB_BIN logcat -d -t 500 | grep -E "DN\|DISPLAY_NOTIF|Notification.*displayed|com.timesafari.daily.NOTIFICATION" | tail -5 || true) + local notification_logs=$($ADB_BIN logcat -d -t 500 | grep -E "DN\|DISPLAY_NOTIF|Notification.*displayed|org.timesafari.daily.NOTIFICATION" | tail -5 || true) if [ -n "${notification_logs}" ]; then warn "Notification display logs found, but no rollover logs - rollover may have failed" info "Notification log excerpt:" diff --git a/test-apps/daily-notification-test/README.md b/test-apps/daily-notification-test/README.md index 2c40786..d30de45 100644 --- a/test-apps/daily-notification-test/README.md +++ b/test-apps/daily-notification-test/README.md @@ -106,7 +106,7 @@ npm run lint ## ADB Commands for Android Testing -**Package Name**: `com.timesafari.dailynotification.test` +**Package Name**: `org.timesafari.dailynotification.test` ### Check Device Connection @@ -136,7 +136,7 @@ Check if the app is installed: adb shell pm list packages | grep timesafari # List only this app's package -adb shell pm list packages com.timesafari.dailynotification.test +adb shell pm list packages org.timesafari.dailynotification.test ``` ### Launch/Raise the App @@ -145,10 +145,10 @@ Launch the app or bring it to foreground: ```sh # Launch the main activity -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity # Launch with explicit intent -adb shell am start -a android.intent.action.MAIN -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -a android.intent.action.MAIN -n org.timesafari.dailynotification.test/.MainActivity ``` ### Uninstall App @@ -157,10 +157,10 @@ Remove the app from the device: ```sh # Uninstall by package name -adb uninstall com.timesafari.dailynotification.test +adb uninstall org.timesafari.dailynotification.test # Force uninstall (if regular uninstall fails) -adb shell pm uninstall -k --user 0 com.timesafari.dailynotification.test +adb shell pm uninstall -k --user 0 org.timesafari.dailynotification.test ``` ### Additional Useful ADB Commands @@ -177,17 +177,17 @@ adb logcat -c **Check App Info**: ```sh # Get app version and info -adb shell dumpsys package com.timesafari.dailynotification.test | grep -A 5 "versionName\|versionCode" +adb shell dumpsys package org.timesafari.dailynotification.test | grep -A 5 "versionName\|versionCode" ``` **Force Stop App**: ```sh # Force stop the app (useful for testing recovery scenarios) -adb shell am force-stop com.timesafari.dailynotification.test +adb shell am force-stop org.timesafari.dailynotification.test ``` **Clear App Data**: ```sh # Clear app data (resets to fresh install state) -adb shell pm clear com.timesafari.dailynotification.test +adb shell pm clear org.timesafari.dailynotification.test ``` diff --git a/test-apps/daily-notification-test/android/app/build.gradle b/test-apps/daily-notification-test/android/app/build.gradle index a55631f..f6f75b0 100644 --- a/test-apps/daily-notification-test/android/app/build.gradle +++ b/test-apps/daily-notification-test/android/app/build.gradle @@ -1,10 +1,10 @@ apply plugin: 'com.android.application' android { - namespace "com.timesafari.dailynotification.test" + namespace "org.timesafari.dailynotification.test" compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { - applicationId "com.timesafari.dailynotification.test" + applicationId "org.timesafari.dailynotification.test" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 diff --git a/test-apps/daily-notification-test/android/app/proguard-rules.pro b/test-apps/daily-notification-test/android/app/proguard-rules.pro index f9eba7c..25761da 100644 --- a/test-apps/daily-notification-test/android/app/proguard-rules.pro +++ b/test-apps/daily-notification-test/android/app/proguard-rules.pro @@ -32,58 +32,58 @@ } # Keep DailyNotification plugin classes --keep class com.timesafari.dailynotification.** { *; } +-keep class org.timesafari.dailynotification.** { *; } # Keep plugin method names and signatures --keepclassmembers class com.timesafari.dailynotification.DailyNotificationPlugin { +-keepclassmembers class org.timesafari.dailynotification.DailyNotificationPlugin { public *; } # Keep all plugin manager classes --keep class com.timesafari.dailynotification.*Manager { *; } --keep class com.timesafari.dailynotification.*Storage { *; } --keep class com.timesafari.dailynotification.*Receiver { *; } +-keep class org.timesafari.dailynotification.*Manager { *; } +-keep class org.timesafari.dailynotification.*Storage { *; } +-keep class org.timesafari.dailynotification.*Receiver { *; } # Keep Room database classes --keep class com.timesafari.dailynotification.storage.** { *; } --keep class com.timesafari.dailynotification.database.** { *; } +-keep class org.timesafari.dailynotification.storage.** { *; } +-keep class org.timesafari.dailynotification.database.** { *; } # Keep error handling classes --keep class com.timesafari.dailynotification.*Error* { *; } --keep class com.timesafari.dailynotification.*Exception* { *; } +-keep class org.timesafari.dailynotification.*Error* { *; } +-keep class org.timesafari.dailynotification.*Exception* { *; } # Keep JWT and ETag managers --keep class com.timesafari.dailynotification.*JWT* { *; } --keep class com.timesafari.dailynotification.*ETag* { *; } +-keep class org.timesafari.dailynotification.*JWT* { *; } +-keep class org.timesafari.dailynotification.*ETag* { *; } # Keep performance and optimization classes --keep class com.timesafari.dailynotification.*Performance* { *; } --keep class com.timesafari.dailynotification.*Optimizer* { *; } +-keep class org.timesafari.dailynotification.*Performance* { *; } +-keep class org.timesafari.dailynotification.*Optimizer* { *; } # Keep rolling window and TTL classes --keep class com.timesafari.dailynotification.*Rolling* { *; } --keep class com.timesafari.dailynotification.*TTL* { *; } +-keep class org.timesafari.dailynotification.*Rolling* { *; } +-keep class org.timesafari.dailynotification.*TTL* { *; } # Keep exact alarm and reboot recovery classes --keep class com.timesafari.dailynotification.*Exact* { *; } --keep class com.timesafari.dailynotification.*Reboot* { *; } --keep class com.timesafari.dailynotification.*Recovery* { *; } +-keep class org.timesafari.dailynotification.*Exact* { *; } +-keep class org.timesafari.dailynotification.*Reboot* { *; } +-keep class org.timesafari.dailynotification.*Recovery* { *; } # Keep enhanced fetcher classes --keep class com.timesafari.dailynotification.*Enhanced* { *; } --keep class com.timesafari.dailynotification.*Fetcher* { *; } +-keep class org.timesafari.dailynotification.*Enhanced* { *; } +-keep class org.timesafari.dailynotification.*Fetcher* { *; } # Keep migration classes --keep class com.timesafari.dailynotification.*Migration* { *; } +-keep class org.timesafari.dailynotification.*Migration* { *; } # Keep channel manager --keep class com.timesafari.dailynotification.ChannelManager { *; } +-keep class org.timesafari.dailynotification.ChannelManager { *; } # Keep permission manager --keep class com.timesafari.dailynotification.PermissionManager { *; } +-keep class org.timesafari.dailynotification.PermissionManager { *; } # Keep scheduler classes --keep class com.timesafari.dailynotification.*Scheduler* { *; } +-keep class org.timesafari.dailynotification.*Scheduler* { *; } # ============================================================================= # Android System Classes diff --git a/test-apps/daily-notification-test/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/test-apps/daily-notification-test/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java deleted file mode 100644 index f2c2217..0000000 --- a/test-apps/daily-notification-test/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import android.content.Context; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.platform.app.InstrumentationRegistry; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - - assertEquals("com.getcapacitor.app", appContext.getPackageName()); - } -} diff --git a/test-apps/daily-notification-test/android/app/src/androidTest/java/com/timesafari/dailynotification/NotificationInstrumentationTest.java b/test-apps/daily-notification-test/android/app/src/androidTest/java/org/timesafari/dailynotification/NotificationInstrumentationTest.java similarity index 99% rename from test-apps/daily-notification-test/android/app/src/androidTest/java/com/timesafari/dailynotification/NotificationInstrumentationTest.java rename to test-apps/daily-notification-test/android/app/src/androidTest/java/org/timesafari/dailynotification/NotificationInstrumentationTest.java index 9676c0e..6b213bb 100644 --- a/test-apps/daily-notification-test/android/app/src/androidTest/java/com/timesafari/dailynotification/NotificationInstrumentationTest.java +++ b/test-apps/daily-notification-test/android/app/src/androidTest/java/org/timesafari/dailynotification/NotificationInstrumentationTest.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification; +package org.timesafari.dailynotification; import static org.junit.Assert.*; diff --git a/test-apps/daily-notification-test/android/app/src/main/AndroidManifest.xml b/test-apps/daily-notification-test/android/app/src/main/AndroidManifest.xml index 0af85ab..584b9e2 100644 --- a/test-apps/daily-notification-test/android/app/src/main/AndroidManifest.xml +++ b/test-apps/daily-notification-test/android/app/src/main/AndroidManifest.xml @@ -28,23 +28,23 @@ - + diff --git a/test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/MainActivity.java b/test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/MainActivity.java similarity index 82% rename from test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/MainActivity.java rename to test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/MainActivity.java index 21410df..57b61d3 100644 --- a/test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/MainActivity.java +++ b/test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/MainActivity.java @@ -1,4 +1,4 @@ -package com.timesafari.dailynotification.test; +package org.timesafari.dailynotification.test; import com.getcapacitor.BridgeActivity; diff --git a/test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/TestApplication.java b/test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/TestApplication.java similarity index 81% rename from test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/TestApplication.java rename to test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/TestApplication.java index 5e4995b..38ce510 100644 --- a/test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/TestApplication.java +++ b/test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/TestApplication.java @@ -8,13 +8,13 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification.test; +package org.timesafari.dailynotification.test; import android.app.Application; import android.content.Context; import android.util.Log; -import com.timesafari.dailynotification.DailyNotificationPlugin; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.DailyNotificationPlugin; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; /** * Application class that registers native fetcher for testing @@ -32,7 +32,7 @@ public class TestApplication extends Application { // Register test native fetcher with application context Context context = getApplicationContext(); NativeNotificationContentFetcher testFetcher = - new com.timesafari.dailynotification.test.TestNativeFetcher(context); + new org.timesafari.dailynotification.test.TestNativeFetcher(context); DailyNotificationPlugin.setNativeFetcher(testFetcher); Log.i(TAG, "Test native fetcher registered: " + testFetcher.getClass().getName()); diff --git a/test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/TestNativeFetcher.java b/test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/TestNativeFetcher.java similarity index 99% rename from test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/TestNativeFetcher.java rename to test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/TestNativeFetcher.java index 8de562b..cd4b52c 100644 --- a/test-apps/daily-notification-test/android/app/src/main/java/com/timesafari/dailynotification/test/TestNativeFetcher.java +++ b/test-apps/daily-notification-test/android/app/src/main/java/org/timesafari/dailynotification/test/TestNativeFetcher.java @@ -8,15 +8,15 @@ * @version 1.0.0 */ -package com.timesafari.dailynotification.test; +package org.timesafari.dailynotification.test; import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import androidx.annotation.NonNull; -import com.timesafari.dailynotification.FetchContext; -import com.timesafari.dailynotification.NativeNotificationContentFetcher; -import com.timesafari.dailynotification.NotificationContent; +import org.timesafari.dailynotification.FetchContext; +import org.timesafari.dailynotification.NativeNotificationContentFetcher; +import org.timesafari.dailynotification.NotificationContent; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonArray; diff --git a/test-apps/daily-notification-test/android/app/src/main/res/values/strings.xml b/test-apps/daily-notification-test/android/app/src/main/res/values/strings.xml index edab104..f54e08f 100644 --- a/test-apps/daily-notification-test/android/app/src/main/res/values/strings.xml +++ b/test-apps/daily-notification-test/android/app/src/main/res/values/strings.xml @@ -2,6 +2,6 @@ Daily Notification Test Daily Notification Test - com.timesafari.dailynotification.test - com.timesafari.dailynotification.test + org.timesafari.dailynotification.test + org.timesafari.dailynotification.test diff --git a/test-apps/daily-notification-test/capacitor.config.ts b/test-apps/daily-notification-test/capacitor.config.ts index 02c79d8..88591ab 100644 --- a/test-apps/daily-notification-test/capacitor.config.ts +++ b/test-apps/daily-notification-test/capacitor.config.ts @@ -2,7 +2,7 @@ import type { CapacitorConfig } from '@capacitor/cli'; import { TEST_USER_ZERO_CONFIG } from './src/config/test-user-zero'; const config: CapacitorConfig = { - appId: 'com.timesafari.dailynotification.test', + appId: 'org.timesafari.dailynotification.test', appName: 'Daily Notification Test', webDir: 'dist', plugins: { diff --git a/test-apps/daily-notification-test/docs/BUILD_QUICK_REFERENCE.md b/test-apps/daily-notification-test/docs/BUILD_QUICK_REFERENCE.md index ff05319..4144dac 100644 --- a/test-apps/daily-notification-test/docs/BUILD_QUICK_REFERENCE.md +++ b/test-apps/daily-notification-test/docs/BUILD_QUICK_REFERENCE.md @@ -86,7 +86,7 @@ cd android adb install -r app/build/outputs/apk/debug/app-debug.apk # Launch app -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity ``` ### iOS Build @@ -208,7 +208,7 @@ cd android echo "📱 Installing and launching..." adb install -r app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity echo "✅ Android build and deploy complete!" ``` diff --git a/test-apps/daily-notification-test/docs/PLUGIN_DETECTION_GUIDE.md b/test-apps/daily-notification-test/docs/PLUGIN_DETECTION_GUIDE.md index 4deba36..f6f6859 100644 --- a/test-apps/daily-notification-test/docs/PLUGIN_DETECTION_GUIDE.md +++ b/test-apps/daily-notification-test/docs/PLUGIN_DETECTION_GUIDE.md @@ -24,7 +24,7 @@ The DailyNotification plugin is registered on the native Android side through: 1. **Automatic Discovery**: Using Capacitor's annotation processor 2. **Manual Registration**: Fallback in `MainActivity.onCreate()` -3. **Plugin Class**: `com.timesafari.dailynotification.DailyNotificationPlugin` +3. **Plugin Class**: `org.timesafari.dailynotification.DailyNotificationPlugin` ### JavaScript Side (WebView) @@ -71,7 +71,7 @@ node scripts/fix-capacitor-plugins.js cd android ./gradlew :app:assembleDebug adb install -r app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity ``` ### Why the Fix Script is Required @@ -85,7 +85,7 @@ adb shell am start -n com.timesafari.dailynotification.test/.MainActivity ```javascript const PLUGIN_ENTRY = { name: "DailyNotification", - classpath: "com.timesafari.dailynotification.DailyNotificationPlugin" + classpath: "org.timesafari.dailynotification.DailyNotificationPlugin" }; ``` @@ -111,7 +111,7 @@ cat android/app/src/main/assets/capacitor.plugins.json [ { "name": "DailyNotification", - "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" + "classpath": "org.timesafari.dailynotification.DailyNotificationPlugin" } ] @@ -189,7 +189,7 @@ cd android echo "📱 Installing and launching..." adb install -r app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n com.timesafari.dailynotification.test/.MainActivity +adb shell am start -n org.timesafari.dailynotification.test/.MainActivity echo "✅ Build and deploy complete!" ``` diff --git a/test-apps/daily-notification-test/ios/App/App.xcodeproj/project.pbxproj b/test-apps/daily-notification-test/ios/App/App.xcodeproj/project.pbxproj index d007acd..c635908 100644 --- a/test-apps/daily-notification-test/ios/App/App.xcodeproj/project.pbxproj +++ b/test-apps/daily-notification-test/ios/App/App.xcodeproj/project.pbxproj @@ -354,7 +354,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification.test; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification.test; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; @@ -373,7 +373,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification.test; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification.test; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; SWIFT_VERSION = 5.0; diff --git a/test-apps/daily-notification-test/ios/App/App/Info.plist b/test-apps/daily-notification-test/ios/App/App/Info.plist index 9978563..9a341e0 100644 --- a/test-apps/daily-notification-test/ios/App/App/Info.plist +++ b/test-apps/daily-notification-test/ios/App/App/Info.plist @@ -47,8 +47,8 @@ BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch - com.timesafari.dailynotification.notify + org.timesafari.dailynotification.fetch + org.timesafari.dailynotification.notify UIBackgroundModes diff --git a/test-apps/daily-notification-test/scripts/build.sh b/test-apps/daily-notification-test/scripts/build.sh index 4fa3393..68bd4a2 100755 --- a/test-apps/daily-notification-test/scripts/build.sh +++ b/test-apps/daily-notification-test/scripts/build.sh @@ -285,7 +285,7 @@ if [ "$BUILD_ALL" = true ] || [ "$BUILD_ANDROID" = true ]; then log_info "APK installed successfully" # Launch app - if adb shell am start -n com.timesafari.dailynotification.test/.MainActivity; then + if adb shell am start -n org.timesafari.dailynotification.test/.MainActivity; then log_info "✅ Android app launched successfully!" else log_warn "Failed to launch app (may already be running)" @@ -534,7 +534,7 @@ if [ "$BUILD_ALL" = true ] || [ "$BUILD_IOS" = true ]; then log_info "App installed on simulator" # Launch app - APP_BUNDLE_ID="com.timesafari.dailynotification.test" + APP_BUNDLE_ID="org.timesafari.dailynotification.test" if xcrun simctl launch "$SIMULATOR_UDID" "$APP_BUNDLE_ID"; then log_info "✅ iOS app launched successfully!" else diff --git a/test-apps/daily-notification-test/scripts/fix-capacitor-plugins.js b/test-apps/daily-notification-test/scripts/fix-capacitor-plugins.js index 956e0e4..96e7176 100755 --- a/test-apps/daily-notification-test/scripts/fix-capacitor-plugins.js +++ b/test-apps/daily-notification-test/scripts/fix-capacitor-plugins.js @@ -26,7 +26,7 @@ const PODFILE_PATH = path.join(__dirname, '../ios/App/Podfile'); const PLUGIN_ENTRY = { name: "DailyNotification", - classpath: "com.timesafari.dailynotification.DailyNotificationPlugin" + classpath: "org.timesafari.dailynotification.DailyNotificationPlugin" }; /** diff --git a/test-apps/ios-app-legacy/App/capacitor.config.json b/test-apps/ios-app-legacy/App/capacitor.config.json index b9ae162..9ed5b94 100644 --- a/test-apps/ios-app-legacy/App/capacitor.config.json +++ b/test-apps/ios-app-legacy/App/capacitor.config.json @@ -1,5 +1,5 @@ { - "appId": "com.timesafari.dailynotification", + "appId": "org.timesafari.dailynotification", "appName": "DailyNotification Test App", "webDir": "www", "server": { diff --git a/test-apps/ios-test-app/capacitor.config.json b/test-apps/ios-test-app/capacitor.config.json index 842efae..fa75e46 100644 --- a/test-apps/ios-test-app/capacitor.config.json +++ b/test-apps/ios-test-app/capacitor.config.json @@ -1,5 +1,5 @@ { - "appId": "com.timesafari.dailynotification.test", + "appId": "org.timesafari.dailynotification.test", "appName": "DailyNotification Test App", "webDir": "App/App/Public", "server": { diff --git a/test-apps/ios-test-app/ios/App/App.xcodeproj/project.pbxproj b/test-apps/ios-test-app/ios/App/App.xcodeproj/project.pbxproj index 07c4c79..575a4e3 100644 --- a/test-apps/ios-test-app/ios/App/App.xcodeproj/project.pbxproj +++ b/test-apps/ios-test-app/ios/App/App.xcodeproj/project.pbxproj @@ -352,7 +352,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification.test; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification.test; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; @@ -371,7 +371,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.timesafari.dailynotification.test; + PRODUCT_BUNDLE_IDENTIFIER = org.timesafari.dailynotification.test; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; SWIFT_VERSION = 5.0; diff --git a/test-apps/ios-test-app/ios/App/App/Info.plist b/test-apps/ios-test-app/ios/App/App/Info.plist index b377a32..e96e357 100644 --- a/test-apps/ios-test-app/ios/App/App/Info.plist +++ b/test-apps/ios-test-app/ios/App/App/Info.plist @@ -48,8 +48,8 @@ BGTaskSchedulerPermittedIdentifiers - com.timesafari.dailynotification.fetch - com.timesafari.dailynotification.notify + org.timesafari.dailynotification.fetch + org.timesafari.dailynotification.notify UIBackgroundModes diff --git a/test-apps/ios-test-app/test-phase1.sh b/test-apps/ios-test-app/test-phase1.sh index d12e0d2..949dbd3 100755 --- a/test-apps/ios-test-app/test-phase1.sh +++ b/test-apps/ios-test-app/test-phase1.sh @@ -13,7 +13,7 @@ if [ -f "${SCRIPT_DIR}/ios-test-lib.sh" ]; then fi # Phase 1 specific configuration -APP_BUNDLE_ID="com.timesafari.dailynotification.test" +APP_BUNDLE_ID="org.timesafari.dailynotification.test" SIMULATOR_DEVICE="iPhone 15" LOG_PREFIX="DNP"