react-native-notify-kit 9.1.12 → 9.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -6
- package/android/libs/app/notifee/core/202108261754/core-202108261754.aar +0 -0
- package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.md5 +1 -1
- package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha1 +1 -1
- package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha256 +1 -1
- package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha512 +1 -1
- package/android/libs/app/notifee/core/maven-metadata.xml +1 -1
- package/android/libs/app/notifee/core/maven-metadata.xml.md5 +1 -1
- package/android/libs/app/notifee/core/maven-metadata.xml.sha1 +1 -1
- package/android/libs/app/notifee/core/maven-metadata.xml.sha256 +1 -1
- package/android/libs/app/notifee/core/maven-metadata.xml.sha512 +1 -1
- package/android/src/main/kotlin/io/invertase/notifee/NotifeeEventSubscriber.kt +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -206,14 +206,127 @@ transformIgnorePatterns: [
|
|
|
206
206
|
|
|
207
207
|
## What's Different from Notifee
|
|
208
208
|
|
|
209
|
-
This fork
|
|
209
|
+
This fork is a complete migration to React Native's **New Architecture**:
|
|
210
|
+
|
|
211
|
+
- **TurboModules only** — no legacy Bridge support
|
|
212
|
+
- **Android bridge rewritten in Kotlin** (original was Java)
|
|
213
|
+
- **11 upstream bugs fixed** — see table below
|
|
214
|
+
- **Reliable trigger notifications** — AlarmManager is the default backend instead of WorkManager
|
|
215
|
+
- **New API: `setNotificationConfig()`** — opt-out flag for iOS remote notification handling
|
|
216
|
+
|
|
217
|
+
## Bugs Fixed from Upstream Notifee
|
|
218
|
+
|
|
219
|
+
| Bug | Platform | Upstream Issue | Fixed in |
|
|
220
|
+
| --- | -------- | -------------- | -------- |
|
|
221
|
+
| Notifee intercepts iOS remote notification tap handlers, breaking RNFB `onNotificationOpenedApp` / `getInitialNotification` | iOS | [#912](https://github.com/invertase/notifee/issues/912) | 9.1.12 |
|
|
222
|
+
| `completionHandler` not called on notification dismiss | iOS | Pre-existing | 9.1.12 |
|
|
223
|
+
| `completionHandler` not called in `willPresentNotification` fallback | iOS | Pre-existing | 9.1.12 |
|
|
224
|
+
| `getInitialNotification()` returns `null` on cold start (deprecated `UIApplicationLaunchOptionsLocalNotificationKey` check) | iOS | [#1128](https://github.com/invertase/notifee/issues/1128) | 9.1.12 |
|
|
225
|
+
| `getInitialNotification()` returns `null` without `pressAction` configured | Android | [#1128](https://github.com/invertase/notifee/issues/1128) | 9.1.12 |
|
|
226
|
+
| Foreground press events silently dropped when React instance not ready | Android | [#1279](https://github.com/invertase/notifee/issues/1279) | 9.1.12 |
|
|
227
|
+
| Trigger notifications not firing on Android 14-15 when app is killed (missing `goAsync()` in `BroadcastReceiver`) | Android | [#1100](https://github.com/invertase/notifee/issues/1100) | 9.1.12 |
|
|
228
|
+
| `SCHEDULE_EXACT_ALARM` denial silently drops scheduled alarms (no fallback) | Android | [#1100](https://github.com/invertase/notifee/issues/1100) | 9.1.12 |
|
|
229
|
+
| `getNotificationSettings()` returns `DENIED` instead of `NOT_DETERMINED` on Android 13+ before permission requested | Android | [#1237](https://github.com/invertase/notifee/issues/1237) | 9.1.12 |
|
|
230
|
+
| Default `AlarmType.SET_EXACT` doesn't work in Doze mode; `AlarmType.SET` uses `RTC` instead of `RTC_WAKEUP` | Android | [#961](https://github.com/invertase/notifee/issues/961) | 9.1.12 |
|
|
231
|
+
| Foreground service crashes with ANR after ~3 min on Android 14+ (`shortService` timeout, missing `onTimeout()`) | Android | [#703](https://github.com/invertase/notifee/issues/703) | 9.1.13 |
|
|
232
|
+
| Manifest merger failure when overriding `foregroundServiceType` on `ForegroundService` | Android | [#1108](https://github.com/invertase/notifee/issues/1108) | 9.1.13 |
|
|
233
|
+
|
|
234
|
+
> **Note for apps requiring guaranteed exact alarms (alarm clocks, timers, calendars):**
|
|
235
|
+
> Add `<uses-permission android:name="android.permission.USE_EXACT_ALARM" />` to your app's
|
|
236
|
+
> `AndroidManifest.xml`. This permission is auto-granted and not revocable, but Google Play
|
|
237
|
+
> restricts its use to apps whose core function requires exact timing.
|
|
238
|
+
> For all other apps, the library uses `SCHEDULE_EXACT_ALARM` with automatic fallback
|
|
239
|
+
> to inexact alarms when the permission is not granted.
|
|
240
|
+
|
|
241
|
+
See [CHANGELOG](https://github.com/marcocrupi/notifee/blob/main/CHANGELOG.md) for full details.
|
|
242
|
+
|
|
243
|
+
## Foreground Service Setup (Android 14+)
|
|
244
|
+
|
|
245
|
+
Android 14 (API 34) requires all foreground services to declare an explicit `foregroundServiceType`. If you use `asForegroundService: true` in your notifications, add the following to your app's `AndroidManifest.xml`:
|
|
246
|
+
|
|
247
|
+
1. **Add the required permissions:**
|
|
210
248
|
|
|
211
|
-
|
|
212
|
-
-
|
|
213
|
-
|
|
214
|
-
-
|
|
249
|
+
```xml
|
|
250
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
251
|
+
<!-- Replace SHORT_SERVICE with the type matching your use case -->
|
|
252
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SHORT_SERVICE" />
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
2. **Declare the service type on Notifee's ForegroundService:**
|
|
256
|
+
|
|
257
|
+
```xml
|
|
258
|
+
<application ...>
|
|
259
|
+
<service
|
|
260
|
+
android:name="app.notifee.core.ForegroundService"
|
|
261
|
+
android:exported="false"
|
|
262
|
+
android:foregroundServiceType="shortService" />
|
|
263
|
+
</application>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Available types: `camera`, `connectedDevice`, `dataSync`, `health`, `location`, `mediaPlayback`, `mediaProjection`, `microphone`, `phoneCall`, `remoteMessaging`, `shortService`, `specialUse`, `systemExempted`. Choose the type that matches your use case — using the wrong type may cause Google Play policy violations.
|
|
267
|
+
|
|
268
|
+
> **Note:** `shortService` has a 3-minute timeout on Android 14+. If your foreground service needs to run longer, use a different type. The library's `onTimeout()` handler will gracefully stop the service if the timeout fires.
|
|
269
|
+
|
|
270
|
+
## Trigger Notification Reliability
|
|
271
|
+
|
|
272
|
+
This fork defaults to AlarmManager for trigger notifications on Android, instead of WorkManager.
|
|
273
|
+
This ensures scheduled notifications are delivered reliably even when the app is killed.
|
|
274
|
+
|
|
275
|
+
The original Notifee used WorkManager by default, which is battery-friendly but unreliable
|
|
276
|
+
for time-sensitive notifications — Android may defer or drop WorkManager tasks based on
|
|
277
|
+
battery optimization, Doze mode, and OEM power management.
|
|
278
|
+
|
|
279
|
+
If you need battery-friendly scheduling where exact timing is not critical (e.g., daily digest
|
|
280
|
+
notifications), you can opt out:
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
await notifee.createTriggerNotification(notification, {
|
|
284
|
+
type: TriggerType.TIMESTAMP,
|
|
285
|
+
timestamp: Date.now() + 60000,
|
|
286
|
+
alarmManager: false, // Uses WorkManager instead
|
|
287
|
+
});
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## New APIs
|
|
291
|
+
|
|
292
|
+
### `setNotificationConfig` (iOS)
|
|
293
|
+
|
|
294
|
+
Controls whether Notifee intercepts remote (push) notification tap events on iOS.
|
|
295
|
+
When using React Native Firebase Messaging alongside Notifee, call this at app startup
|
|
296
|
+
to let Firebase handle remote notification taps:
|
|
297
|
+
|
|
298
|
+
```typescript
|
|
299
|
+
import notifee from 'react-native-notify-kit';
|
|
300
|
+
|
|
301
|
+
await notifee.setNotificationConfig({
|
|
302
|
+
ios: { handleRemoteNotifications: false },
|
|
303
|
+
});
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
With `handleRemoteNotifications: false`:
|
|
307
|
+
|
|
308
|
+
- Remote notifications (FCM) → handled by Firebase Messaging (`onNotificationOpenedApp`, `getInitialNotification`)
|
|
309
|
+
- Local Notifee notifications → still handled by Notifee (unchanged)
|
|
310
|
+
|
|
311
|
+
Default is `true` (backward compatible — Notifee handles everything, same as original Notifee behavior).
|
|
312
|
+
|
|
313
|
+
### Android: `pressAction` required for tap handling
|
|
314
|
+
|
|
315
|
+
On Android, notifications require a `pressAction` to open the app when tapped:
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
await notifee.displayNotification({
|
|
319
|
+
title: 'Hello',
|
|
320
|
+
body: 'Tap to open',
|
|
321
|
+
android: {
|
|
322
|
+
channelId: 'default',
|
|
323
|
+
pressAction: { id: 'default', launchActivity: 'default' },
|
|
324
|
+
},
|
|
325
|
+
});
|
|
326
|
+
```
|
|
215
327
|
|
|
216
|
-
|
|
328
|
+
Without `pressAction`, the notification will display but tapping it will do nothing.
|
|
329
|
+
This is Android platform behavior, not a bug. iOS opens the app by default on tap.
|
|
217
330
|
|
|
218
331
|
## Documentation
|
|
219
332
|
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
03be2bd9ea6f1abab7409b008a68b22f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3c5d3fba5a39e0379492ccebf595780f1ca4b2bb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0adbd7ca46edd01d54d884368b4009a6725d71d84cb1cc390d0d69824cf4f4d8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
47b1f9afbe975069248b988c23d5e693c7aed936016041e259c53180d29f37b8366d68c854f268bfc1b091e0bda4f47931d7814f092c0a9a37b76896e7017d3e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
642689e0ae7e377ba7c0b81eea65b251
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5cca9a43a4a3ec1ef1fea9eb4f7f539845698d6c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
23cbe0485817c9c413e87c45aec0a27a770fd63942baca688b482f819bc97fb6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5794011b4c59116e983c15137b9a08db00585e3a0771d55af89e5abcca04a76770f83cc73fe30a3ca25bf4e23d8ea9e7834e86516b632c68994979c893b99062
|
|
@@ -45,6 +45,12 @@ class NotifeeEventSubscriber : EventListener {
|
|
|
45
45
|
extras.getString(KEY_DETAIL_INPUT)?.let { input ->
|
|
46
46
|
eventDetailMap.putString(KEY_DETAIL_INPUT, input)
|
|
47
47
|
}
|
|
48
|
+
if (extras.containsKey("startId")) {
|
|
49
|
+
eventDetailMap.putInt("startId", extras.getInt("startId"))
|
|
50
|
+
}
|
|
51
|
+
if (extras.containsKey("fgsType")) {
|
|
52
|
+
eventDetailMap.putInt("fgsType", extras.getInt("fgsType"))
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
eventMap.putMap(KEY_DETAIL, eventDetailMap)
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "9.1.
|
|
1
|
+
export declare const version = "9.1.13";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '9.1.
|
|
2
|
+
export const version = '9.1.13';
|