chore: align with daily-notification-plugin 2.0.0 (org.timesafari namespace)

- Update Android manifest, Java imports, and capacitor.plugins.json to use
  org.timesafari.dailynotification (receivers, intent action, plugin classpath)
- Update iOS Info.plist BGTaskSchedulerPermittedIdentifiers to org.timesafari.*
- Bump @timesafari/daily-notification-plugin 1.3.3 → 2.0.0 (package-lock, Podfile.lock)
- Update docs and test-notification-receiver.sh to reference new package/action names
- Lockfile: minor bumps for @expo/cli, @expo/fingerprint, @expo/router-server, babel-preset-expo
This commit is contained in:
Jose Olarte III
2026-03-12 17:20:45 +08:00
parent fb9d5165df
commit 9902e5fac7
14 changed files with 60 additions and 60 deletions

View File

@@ -56,31 +56,31 @@ Alarms are being scheduled successfully and fire at the correct time, but the `D
```xml
<receiver
android:name="com.timesafari.dailynotification.DailyNotificationReceiver"
android:name="org.timesafari.dailynotification.DailyNotificationReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.timesafari.daily.NOTIFICATION" />
<action android:name="org.timesafari.daily.NOTIFICATION" />
</intent-filter>
</receiver>
```
-`exported="true"` is set (required for AlarmManager broadcasts)
- ✅ Intent action matches: `com.timesafari.daily.NOTIFICATION`
- ✅ Intent action matches: `org.timesafari.daily.NOTIFICATION`
- ✅ Receiver is inside `<application>` tag
### Alarm Scheduling Evidence
From logs when scheduling (23:51:32):
```
I DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=com.timesafari.daily.NOTIFICATION, triggerTime=1770105300000, requestCode=44490, scheduleId=timesafari_daily_reminder
I DNP-SCHEDULE: Scheduling OS alarm: variant=ALARM_CLOCK, action=org.timesafari.daily.NOTIFICATION, triggerTime=1770105300000, requestCode=44490, scheduleId=timesafari_daily_reminder
I DNP-NOTIFY: Alarm clock scheduled (setAlarmClock): triggerAt=1770105300000, requestCode=44490
```
From `dumpsys alarm` output:
```
RTC_WAKEUP #36: Alarm{7a8fb5e type 0 origWhen 1770148800000 whenElapsed 122488536 app.timesafari.app}
tag=*walarm*:com.timesafari.daily.NOTIFICATION
tag=*walarm*:org.timesafari.daily.NOTIFICATION
type=RTC_WAKEUP origWhen=2026-02-03 12:00:00.000 window=0 exactAllowReason=policy_permission
operation=PendingIntent{6fce955: PendingIntentRecord{5856f6a app.timesafari.app broadcastIntent}}
```
@@ -94,12 +94,12 @@ RTC_WAKEUP #36: Alarm{7a8fb5e type 0 origWhen 1770148800000 whenElapsed 12248853
### Manual Broadcast Test (Works)
```bash
adb shell am broadcast -a com.timesafari.daily.NOTIFICATION -n app.timesafari.app/com.timesafari.dailynotification.DailyNotificationReceiver
adb shell am broadcast -a org.timesafari.daily.NOTIFICATION -n app.timesafari.app/org.timesafari.dailynotification.DailyNotificationReceiver
```
**Result**: ✅ Receiver triggered successfully
```
02-02 23:46:07.505 DailyNotificationReceiver D DN|RECEIVE_START action=com.timesafari.daily.NOTIFICATION
02-02 23:46:07.505 DailyNotificationReceiver D DN|RECEIVE_START action=org.timesafari.daily.NOTIFICATION
02-02 23:46:07.506 DailyNotificationReceiver W DN|RECEIVE_ERR missing_id
```
@@ -116,7 +116,7 @@ The PendingIntent may be created without explicitly specifying the component, ca
**Expected Fix**: When creating the PendingIntent for AlarmManager, explicitly set the component:
```kotlin
val intent = Intent("com.timesafari.daily.NOTIFICATION").apply {
val intent = Intent("org.timesafari.daily.NOTIFICATION").apply {
setComponent(ComponentName(context, DailyNotificationReceiver::class.java))
putExtra("id", scheduleId) // Also fix missing_id issue
}
@@ -222,7 +222,7 @@ intent.putExtra("scheduleId", scheduleId) // if receiver expects different key
When an alarm fires:
1. AlarmManager delivers the broadcast
2. `DailyNotificationReceiver.onReceive()` is called
3. Log shows: `DN|RECEIVE_START action=com.timesafari.daily.NOTIFICATION`
3. Log shows: `DN|RECEIVE_START action=org.timesafari.daily.NOTIFICATION`
4. Receiver finds the ID in Intent extras (no `missing_id` error)
5. Notification is displayed
@@ -243,8 +243,8 @@ When an alarm fires:
```bash
# This works - receiver is triggered
adb shell am broadcast \
-a com.timesafari.daily.NOTIFICATION \
-n app.timesafari.app/com.timesafari.dailynotification.DailyNotificationReceiver \
-a org.timesafari.daily.NOTIFICATION \
-n app.timesafari.app/org.timesafari.dailynotification.DailyNotificationReceiver \
--es "id" "timesafari_daily_reminder"
```