expo-notifications 0.14.1 → 0.15.2
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/CHANGELOG.md +31 -1
- package/README.md +22 -20
- package/android/build.gradle +25 -11
- package/android/src/main/java/expo/modules/notifications/notifications/background/BackgroundRemoteNotificationTaskConsumer.java +5 -5
- package/android/src/main/java/expo/modules/notifications/notifications/background/ExpoBackgroundNotificationTasksModule.java +1 -1
- package/android/src/main/java/expo/modules/notifications/service/NotificationsService.kt +8 -14
- package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoSchedulingDelegate.kt +21 -6
- package/android/src/main/java/expo/modules/notifications/tokens/PushTokenModule.java +5 -6
- package/build/BackgroundNotificationTasksModule.native.d.ts +1 -0
- package/build/BackgroundNotificationTasksModule.native.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.types.d.ts +1 -0
- package/build/BackgroundNotificationTasksModule.types.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.web.d.ts +1 -0
- package/build/BackgroundNotificationTasksModule.web.d.ts.map +1 -0
- package/build/BadgeModule.d.ts +1 -0
- package/build/BadgeModule.d.ts.map +1 -0
- package/build/BadgeModule.native.d.ts +1 -0
- package/build/BadgeModule.native.d.ts.map +1 -0
- package/build/BadgeModule.types.d.ts +1 -0
- package/build/BadgeModule.types.d.ts.map +1 -0
- package/build/BadgeModule.web.d.ts +1 -0
- package/build/BadgeModule.web.d.ts.map +1 -0
- package/build/DevicePushTokenAutoRegistration.fx.d.ts +1 -0
- package/build/DevicePushTokenAutoRegistration.fx.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.native.d.ts +1 -0
- package/build/NotificationCategoriesModule.native.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.types.d.ts +1 -0
- package/build/NotificationCategoriesModule.types.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.web.d.ts +1 -0
- package/build/NotificationCategoriesModule.web.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.d.ts +1 -0
- package/build/NotificationChannelGroupManager.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.native.d.ts +1 -0
- package/build/NotificationChannelGroupManager.native.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.types.d.ts +1 -0
- package/build/NotificationChannelGroupManager.types.d.ts.map +1 -0
- package/build/NotificationChannelManager.d.ts +1 -0
- package/build/NotificationChannelManager.d.ts.map +1 -0
- package/build/NotificationChannelManager.native.d.ts +1 -0
- package/build/NotificationChannelManager.native.d.ts.map +1 -0
- package/build/NotificationChannelManager.types.d.ts +1 -0
- package/build/NotificationChannelManager.types.d.ts.map +1 -0
- package/build/NotificationPermissions.d.ts +1 -0
- package/build/NotificationPermissions.d.ts.map +1 -0
- package/build/NotificationPermissions.types.d.ts +1 -0
- package/build/NotificationPermissions.types.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.d.ts +1 -0
- package/build/NotificationPermissionsModule.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.native.d.ts +1 -0
- package/build/NotificationPermissionsModule.native.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.types.d.ts +1 -0
- package/build/NotificationPermissionsModule.types.d.ts.map +1 -0
- package/build/NotificationPresenterModule.d.ts +1 -0
- package/build/NotificationPresenterModule.d.ts.map +1 -0
- package/build/NotificationPresenterModule.native.d.ts +1 -0
- package/build/NotificationPresenterModule.native.d.ts.map +1 -0
- package/build/NotificationPresenterModule.types.d.ts +1 -0
- package/build/NotificationPresenterModule.types.d.ts.map +1 -0
- package/build/NotificationScheduler.d.ts +1 -0
- package/build/NotificationScheduler.d.ts.map +1 -0
- package/build/NotificationScheduler.native.d.ts +1 -0
- package/build/NotificationScheduler.native.d.ts.map +1 -0
- package/build/NotificationScheduler.types.d.ts +1 -0
- package/build/NotificationScheduler.types.d.ts.map +1 -0
- package/build/Notifications.types.d.ts +1 -0
- package/build/Notifications.types.d.ts.map +1 -0
- package/build/NotificationsEmitter.d.ts +1 -0
- package/build/NotificationsEmitter.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.d.ts +1 -0
- package/build/NotificationsEmitterModule.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.native.d.ts +1 -0
- package/build/NotificationsEmitterModule.native.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.types.d.ts +1 -0
- package/build/NotificationsEmitterModule.types.d.ts.map +1 -0
- package/build/NotificationsHandler.d.ts +1 -0
- package/build/NotificationsHandler.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.d.ts +1 -0
- package/build/NotificationsHandlerModule.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.native.d.ts +1 -0
- package/build/NotificationsHandlerModule.native.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.types.d.ts +1 -0
- package/build/NotificationsHandlerModule.types.d.ts.map +1 -0
- package/build/PushTokenManager.d.ts +1 -0
- package/build/PushTokenManager.d.ts.map +1 -0
- package/build/PushTokenManager.native.d.ts +1 -0
- package/build/PushTokenManager.native.d.ts.map +1 -0
- package/build/PushTokenManager.types.d.ts +1 -0
- package/build/PushTokenManager.types.d.ts.map +1 -0
- package/build/ServerRegistrationModule.d.ts +1 -0
- package/build/ServerRegistrationModule.d.ts.map +1 -0
- package/build/ServerRegistrationModule.native.d.ts +1 -0
- package/build/ServerRegistrationModule.native.d.ts.map +1 -0
- package/build/ServerRegistrationModule.types.d.ts +1 -0
- package/build/ServerRegistrationModule.types.d.ts.map +1 -0
- package/build/ServerRegistrationModule.web.d.ts +1 -0
- package/build/ServerRegistrationModule.web.d.ts.map +1 -0
- package/build/ServerRegistrationModule.web.js +1 -1
- package/build/ServerRegistrationModule.web.js.map +1 -1
- package/build/TokenEmitter.d.ts +1 -0
- package/build/TokenEmitter.d.ts.map +1 -0
- package/build/Tokens.types.d.ts +1 -0
- package/build/Tokens.types.d.ts.map +1 -0
- package/build/cancelAllScheduledNotificationsAsync.d.ts +1 -0
- package/build/cancelAllScheduledNotificationsAsync.d.ts.map +1 -0
- package/build/cancelScheduledNotificationAsync.d.ts +1 -0
- package/build/cancelScheduledNotificationAsync.d.ts.map +1 -0
- package/build/deleteNotificationCategoryAsync.d.ts +1 -0
- package/build/deleteNotificationCategoryAsync.d.ts.map +1 -0
- package/build/deleteNotificationChannelAsync.android.d.ts +1 -0
- package/build/deleteNotificationChannelAsync.android.d.ts.map +1 -0
- package/build/deleteNotificationChannelAsync.d.ts +1 -0
- package/build/deleteNotificationChannelAsync.d.ts.map +1 -0
- package/build/deleteNotificationChannelGroupAsync.android.d.ts +1 -0
- package/build/deleteNotificationChannelGroupAsync.android.d.ts.map +1 -0
- package/build/deleteNotificationChannelGroupAsync.d.ts +1 -0
- package/build/deleteNotificationChannelGroupAsync.d.ts.map +1 -0
- package/build/dismissAllNotificationsAsync.d.ts +1 -0
- package/build/dismissAllNotificationsAsync.d.ts.map +1 -0
- package/build/dismissNotificationAsync.d.ts +1 -0
- package/build/dismissNotificationAsync.d.ts.map +1 -0
- package/build/getAllScheduledNotificationsAsync.d.ts +1 -0
- package/build/getAllScheduledNotificationsAsync.d.ts.map +1 -0
- package/build/getBadgeCountAsync.d.ts +1 -0
- package/build/getBadgeCountAsync.d.ts.map +1 -0
- package/build/getDevicePushTokenAsync.d.ts +1 -0
- package/build/getDevicePushTokenAsync.d.ts.map +1 -0
- package/build/getDevicePushTokenAsync.web.d.ts +1 -0
- package/build/getDevicePushTokenAsync.web.d.ts.map +1 -0
- package/build/getDevicePushTokenAsync.web.js +1 -1
- package/build/getDevicePushTokenAsync.web.js.map +1 -1
- package/build/getExpoPushTokenAsync.d.ts +1 -0
- package/build/getExpoPushTokenAsync.d.ts.map +1 -0
- package/build/getExpoPushTokenAsync.js +4 -4
- package/build/getExpoPushTokenAsync.js.map +1 -1
- package/build/getNextTriggerDateAsync.d.ts +1 -0
- package/build/getNextTriggerDateAsync.d.ts.map +1 -0
- package/build/getNotificationCategoriesAsync.d.ts +1 -0
- package/build/getNotificationCategoriesAsync.d.ts.map +1 -0
- package/build/getNotificationChannelAsync.android.d.ts +1 -0
- package/build/getNotificationChannelAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelAsync.d.ts +1 -0
- package/build/getNotificationChannelAsync.d.ts.map +1 -0
- package/build/getNotificationChannelGroupAsync.android.d.ts +1 -0
- package/build/getNotificationChannelGroupAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelGroupAsync.d.ts +1 -0
- package/build/getNotificationChannelGroupAsync.d.ts.map +1 -0
- package/build/getNotificationChannelGroupsAsync.android.d.ts +1 -0
- package/build/getNotificationChannelGroupsAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelGroupsAsync.d.ts +1 -0
- package/build/getNotificationChannelGroupsAsync.d.ts.map +1 -0
- package/build/getNotificationChannelsAsync.android.d.ts +1 -0
- package/build/getNotificationChannelsAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelsAsync.d.ts +1 -0
- package/build/getNotificationChannelsAsync.d.ts.map +1 -0
- package/build/getPresentedNotificationsAsync.d.ts +1 -0
- package/build/getPresentedNotificationsAsync.d.ts.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -0
- package/build/presentNotificationAsync.d.ts +1 -0
- package/build/presentNotificationAsync.d.ts.map +1 -0
- package/build/registerTaskAsync.d.ts +1 -0
- package/build/registerTaskAsync.d.ts.map +1 -0
- package/build/scheduleNotificationAsync.d.ts +1 -0
- package/build/scheduleNotificationAsync.d.ts.map +1 -0
- package/build/setBadgeCountAsync.d.ts +1 -0
- package/build/setBadgeCountAsync.d.ts.map +1 -0
- package/build/setNotificationCategoryAsync.d.ts +1 -0
- package/build/setNotificationCategoryAsync.d.ts.map +1 -0
- package/build/setNotificationChannelAsync.android.d.ts +1 -0
- package/build/setNotificationChannelAsync.android.d.ts.map +1 -0
- package/build/setNotificationChannelAsync.d.ts +1 -0
- package/build/setNotificationChannelAsync.d.ts.map +1 -0
- package/build/setNotificationChannelGroupAsync.android.d.ts +1 -0
- package/build/setNotificationChannelGroupAsync.android.d.ts.map +1 -0
- package/build/setNotificationChannelGroupAsync.d.ts +1 -0
- package/build/setNotificationChannelGroupAsync.d.ts.map +1 -0
- package/build/unregisterTaskAsync.d.ts +1 -0
- package/build/unregisterTaskAsync.d.ts.map +1 -0
- package/build/useLastNotificationResponse.d.ts +1 -0
- package/build/useLastNotificationResponse.d.ts.map +1 -0
- package/build/utils/updateDevicePushTokenAsync.d.ts +1 -0
- package/build/utils/updateDevicePushTokenAsync.d.ts.map +1 -0
- package/build/utils/updateDevicePushTokenAsync.js +1 -1
- package/build/utils/updateDevicePushTokenAsync.js.map +1 -1
- package/ios/EXNotifications/Notifications/Background/EXBackgroundNotificationTasksModule.m +3 -3
- package/ios/EXNotifications/Notifications/Background/EXBackgroundRemoteNotificationConsumer.h +3 -3
- package/ios/EXNotifications/Notifications/Background/EXBackgroundRemoteNotificationConsumer.m +4 -4
- package/ios/EXNotifications.xcframework/ios-arm64/EXNotifications.framework/EXNotifications +0 -0
- package/ios/EXNotifications.xcframework/ios-arm64/EXNotifications.framework/Info.plist +0 -0
- package/ios/EXNotifications.xcframework/ios-arm64_x86_64-simulator/EXNotifications.framework/EXNotifications +0 -0
- package/ios/EXNotifications.xcframework/ios-arm64_x86_64-simulator/EXNotifications.framework/Info.plist +0 -0
- package/package.json +7 -8
- package/src/ServerRegistrationModule.web.ts +1 -1
- package/src/getDevicePushTokenAsync.web.ts +1 -1
- package/src/getExpoPushTokenAsync.ts +4 -4
- package/src/utils/updateDevicePushTokenAsync.ts +1 -1
- package/android/src/main/java/expo/modules/notifications/badge/SetBadgeCountNotificationEffect.java +0 -56
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/BadgeSettingNotificationBuilder.java +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,37 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 0.
|
|
13
|
+
## 0.15.2 — 2022-05-05
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed Android 12+ runtime crash caused by `PendingIntent` misconfiguration. ([#17333](https://github.com/expo/expo/pull/17333) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
### ⚠️ Notices
|
|
20
|
+
|
|
21
|
+
- Fixed exception on Android 12+ devices for missing `SCHEDULE_EXACT_ALARM` permission. If `scheduleNotificationAsync` needs a precise timer, the `SCHEDULE_EXACT_ALARM` should be explicitly added to **AndroidManifest.xml**. ([#17334](https://github.com/expo/expo/pull/17334) by [@kudo](https://github.com/kudo))
|
|
22
|
+
|
|
23
|
+
## 0.15.1 — 2022-04-27
|
|
24
|
+
|
|
25
|
+
### 💡 Others
|
|
26
|
+
|
|
27
|
+
- Remove badge deadcode ([#17205](https://github.com/expo/expo/pull/17205) by [@wschurman](https://github.com/wschurman))
|
|
28
|
+
|
|
29
|
+
## 0.15.0 — 2022-04-18
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug fixes
|
|
32
|
+
|
|
33
|
+
- Upgrade firebase messaging dependency to v21. This means `expo-notifications` no longer relies on `FirebaseInstanceId`. If you added `com.google.firebase:firebase-iid` to your `android/app/build.gradle` file for this library, it is no longer required and you can safely remove that dependency. ([#15010](https://github.com/expo/expo/pull/15010) by [@cruzach](https://github.com/cruzach))
|
|
34
|
+
|
|
35
|
+
### 💡 Others
|
|
36
|
+
|
|
37
|
+
- Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` and `@expo/image-utils` from `^0.3.16` to `^0.3.18` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
|
|
38
|
+
|
|
39
|
+
### ⚠️ Notices
|
|
40
|
+
|
|
41
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
42
|
+
|
|
43
|
+
## 0.14.1 - 2022-02-01
|
|
14
44
|
|
|
15
45
|
### 🐛 Bug fixes
|
|
16
46
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Provides an API to fetch push notification tokens and to present, schedule, rece
|
|
|
18
18
|
|
|
19
19
|
# Installation in managed Expo projects
|
|
20
20
|
|
|
21
|
-
Please refer to the [installation instructions in the Expo documentation](https://docs.expo.
|
|
21
|
+
Please refer to the [installation instructions in the Expo documentation](https://docs.expo.dev/versions/latest/sdk/notifications/#installation).
|
|
22
22
|
|
|
23
23
|
# Installation in bare React Native projects
|
|
24
24
|
|
|
@@ -43,10 +43,12 @@ In order to be able to receive push notifications on the device:
|
|
|
43
43
|
|
|
44
44
|
### Configure for Android
|
|
45
45
|
|
|
46
|
-
In order to be able to receive push notifications on the device ensure that your project is set up for Firebase. For more information on how to do it, see [this guide](https://docs.expo.
|
|
46
|
+
In order to be able to receive push notifications on the device ensure that your project is set up for Firebase. For more information on how to do it, see [this guide](https://docs.expo.dev/guides/setup-native-firebase/#bare-workflow-setup).
|
|
47
47
|
|
|
48
48
|
This module requires permission to subscribe to device boot. It's used to setup the scheduled notifications right after the device (re)starts. The `RECEIVE_BOOT_COMPLETED` permission is added automatically.
|
|
49
49
|
|
|
50
|
+
**Note:** Starting from Android 12 (API level 31), to schedule the notification that triggers at the exact time, you need to add `<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>` to **AndroidManifest.xml**. You can read more about the exact alarm permission [here](https://developer.android.com/about/versions/12/behavior-changes-12#exact-alarm-permission).
|
|
51
|
+
|
|
50
52
|
<details><summary><strong>Expand to view how the notification icon and the default color can be customized in a plain React Native app</strong></summary> <p>
|
|
51
53
|
|
|
52
54
|
- **To customize the icon**:
|
|
@@ -117,7 +119,7 @@ This module requires permission to subscribe to device boot. It's used to setup
|
|
|
117
119
|
|
|
118
120
|
### Config plugin setup (optional)
|
|
119
121
|
|
|
120
|
-
If you're using EAS Build, you can set your Android notification icon and color tint, add custom push notification sounds, and set your iOS notification environment using the expo-notifications config plugin ([what's a config plugin?](http://docs.expo.
|
|
122
|
+
If you're using EAS Build, you can set your Android notification icon and color tint, add custom push notification sounds, and set your iOS notification environment using the expo-notifications config plugin ([what's a config plugin?](http://docs.expo.dev/guides/config-plugins/)). To setup, just add the config plugin to the plugins array of your `app.json` or `app.config.js` as shown below, then rebuild the app.
|
|
121
123
|
|
|
122
124
|
```json
|
|
123
125
|
{
|
|
@@ -152,7 +154,7 @@ If you're using EAS Build, you can set your Android notification icon and color
|
|
|
152
154
|
|
|
153
155
|
If you would like to send notifications with Expo servers, the servers will need to have a way to authenticate with APNS/FCM that they are authorized to send notifications on your behalf. To do this:
|
|
154
156
|
|
|
155
|
-
- for Firebase Cloud Messaging, check out this guide: _[Uploading Server Credentials](https://docs.expo.
|
|
157
|
+
- for Firebase Cloud Messaging, check out this guide: _[Uploading Server Credentials](https://docs.expo.dev/push-notifications/using-fcm/#uploading-server-credentials)_,
|
|
156
158
|
- for APNS:
|
|
157
159
|
- run `expo credentials:manager` in the root of your application,
|
|
158
160
|
- if you've already uploaded a Push Notifications Key in another project and would like to reuse it in the current project, select _Use existing Push Notifications Key in current project_ (you may need to set `slug` and `ios.bundleIdentifier` fields in `app.json` so that the server knows to which `experienceId` and `bundleIdentifier` the key should be attributed),
|
|
@@ -216,7 +218,7 @@ If the device you're experiencing this on hasn't been setup with a SIM card it l
|
|
|
216
218
|
|
|
217
219
|
### Setting custom notification sounds
|
|
218
220
|
|
|
219
|
-
Custom notification sounds are only supported when using [EAS Build](https://docs.expo.
|
|
221
|
+
Custom notification sounds are only supported when using [EAS Build](https://docs.expo.dev/build/introduction/), or in the bare workflow.
|
|
220
222
|
|
|
221
223
|
To add custom push notification sounds to your app, add the `expo-notifications` plugin to your `app.json` file:
|
|
222
224
|
|
|
@@ -364,7 +366,7 @@ The following methods are exported by the `expo-notifications` module:
|
|
|
364
366
|
|
|
365
367
|
## Custom notification icon and colors (Android only)
|
|
366
368
|
|
|
367
|
-
Setting a default icon and color for all of your app's notifications is almost too easy. In the managed workflow, just set your [`notification.icon`](https://docs.expo.
|
|
369
|
+
Setting a default icon and color for all of your app's notifications is almost too easy. In the managed workflow, just set your [`notification.icon`](https://docs.expo.dev/versions/latest/config/app/#notification) and [`notification.color`](https://docs.expo.dev/versions/latest/config/app/#notification) keys in `app.json`, and rebuild your app! In the bare workflow, you'll need to follow [these instructions](https://github.com/expo/expo/tree/main/packages/expo-notifications#configure-for-android).
|
|
368
370
|
|
|
369
371
|
For your notification icon, make sure you follow [Google's design guidelines](https://material.io/design/iconography/product-icons.html#design-principles) (the icon must be all white with a transparent background) or else it may not be displayed as intended.
|
|
370
372
|
|
|
@@ -390,9 +392,9 @@ export interface FirebaseData {
|
|
|
390
392
|
|
|
391
393
|
### `getExpoPushTokenAsync(options: ExpoTokenOptions): ExpoPushToken`
|
|
392
394
|
|
|
393
|
-
Returns an Expo token that can be used to send a push notification to this device using Expo push notifications service. [Read more in the Push Notifications guide](https://docs.expo.
|
|
395
|
+
Returns an Expo token that can be used to send a push notification to this device using Expo push notifications service. [Read more in the Push Notifications guide](https://docs.expo.dev/guides/push-notifications/).
|
|
394
396
|
|
|
395
|
-
> **Note:** For Expo's backend to be able to send notifications to your app, you will need to provide it with push notification keys. This can be done using `expo-cli` (`expo credentials:manager`). [Read more in the “Upload notifications credentials” guide](https://docs.expo.
|
|
397
|
+
> **Note:** For Expo's backend to be able to send notifications to your app, you will need to provide it with push notification keys. This can be done using `expo-cli` (`expo credentials:manager`). [Read more in the “Upload notifications credentials” guide](https://docs.expo.dev/push-notifications/push-notifications-setup/#credentials).
|
|
396
398
|
|
|
397
399
|
> **Note:** Especially on iOS, `Promise`s returned by this method may take longer periods of time to fulfill. For more information see [Fetching a push token takes a long time on iOS](#fetching-a-push-token-takes-a-long-time-on-ios).
|
|
398
400
|
|
|
@@ -400,10 +402,10 @@ Returns an Expo token that can be used to send a push notification to this devic
|
|
|
400
402
|
|
|
401
403
|
This function accepts an optional object allowing you to pass in configuration, consisting of fields (all are optional, but some may have to be defined if configuration cannot be inferred):
|
|
402
404
|
|
|
403
|
-
- **experienceId (_string_)** -- The ID of the experience to which the token should be attributed. Defaults to [`Constants.manifest.id`](https://docs.expo.
|
|
405
|
+
- **experienceId (_string_)** -- The ID of the experience to which the token should be attributed. Defaults to [`Constants.manifest.id`](https://docs.expo.dev/versions/latest/sdk/constants/#constantsmanifest) exposed by `expo-constants`. In the bare workflow, you must provide a value which takes the shape `@username/projectSlug`, where `username` is the Expo account that the project is associated with, and `projectSlug` is your [`slug` from `app.json`](https://docs.expo.dev/versions/latest/config/app/#slug).
|
|
404
406
|
- **devicePushToken ([_DevicePushToken_](#devicepushtoken))** -- The device push token with which to register at the backend. Defaults to a token fetched with [`getDevicePushTokenAsync()`](#getdevicepushtokenasync-devicepushtoken).
|
|
405
|
-
- **applicationId (_string_)** -- The ID of the application to which the token should be attributed. Defaults to [`Application.applicationId`](https://docs.expo.
|
|
406
|
-
- **development (_boolean_)** -- Makes sense only on iOS, where there are two push notification services: sandbox and production. This defines whether the push token is supposed to be used with the sandbox platform notification service. Defaults to [`Application.getIosPushNotificationServiceEnvironmentAsync()`](https://docs.expo.
|
|
407
|
+
- **applicationId (_string_)** -- The ID of the application to which the token should be attributed. Defaults to [`Application.applicationId`](https://docs.expo.dev/versions/latest/sdk/application/#applicationapplicationid) exposed by `expo-application`.
|
|
408
|
+
- **development (_boolean_)** -- Makes sense only on iOS, where there are two push notification services: sandbox and production. This defines whether the push token is supposed to be used with the sandbox platform notification service. Defaults to [`Application.getIosPushNotificationServiceEnvironmentAsync()`](https://docs.expo.dev/versions/latest/sdk/application/#applicationgetiospushnotificationserviceenvironmentasync) exposed by `expo-application` or `false`. Most probably you won't need to customize that. You may want to customize that if you don't want to install `expo-application` and still use the sandbox APNS.
|
|
407
409
|
|
|
408
410
|
#### Returns
|
|
409
411
|
|
|
@@ -744,7 +746,7 @@ Notifications.setNotificationHandler({
|
|
|
744
746
|
|
|
745
747
|
### `registerTaskAsync(taskName: string): void`
|
|
746
748
|
|
|
747
|
-
When a notification is received while the app is backgrounded, using this function you can set a callback that will be run in response to that notification. Under the hood, this function is run using `expo-task-manager`. You **must** define the task _first_, with [`TaskManager.defineTask`](https://docs.expo.
|
|
749
|
+
When a notification is received while the app is backgrounded, using this function you can set a callback that will be run in response to that notification. Under the hood, this function is run using `expo-task-manager`. You **must** define the task _first_, with [`TaskManager.defineTask`](https://docs.expo.dev/versions/latest/sdk/task-manager/#taskmanagerdefinetasktaskname-task). Make sure you define it in the global scope.
|
|
748
750
|
|
|
749
751
|
The `taskName` argument is the string you passed to `TaskManager.defineTask` as the "taskName". The callback function you define with `TaskManager.defineTask` will receive the following arguments:
|
|
750
752
|
|
|
@@ -754,18 +756,18 @@ The `taskName` argument is the string you passed to `TaskManager.defineTask` as
|
|
|
754
756
|
|
|
755
757
|
#### Examples
|
|
756
758
|
|
|
757
|
-
Implementing a notification handler that always shows the notification when it is received
|
|
758
|
-
|
|
759
759
|
```ts
|
|
760
|
+
import * as TaskManager from 'expo-task-manager';
|
|
760
761
|
import * as Notifications from 'expo-notifications';
|
|
761
762
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}),
|
|
763
|
+
const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';
|
|
764
|
+
|
|
765
|
+
TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
|
|
766
|
+
console.log('Received a notification in the background!');
|
|
767
|
+
// Do something with the notification data
|
|
768
768
|
});
|
|
769
|
+
|
|
770
|
+
Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);
|
|
769
771
|
```
|
|
770
772
|
|
|
771
773
|
### `unregisterTaskAsync(taskName: string): void`
|
package/android/build.gradle
CHANGED
|
@@ -3,20 +3,35 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.
|
|
6
|
+
version = '0.15.2'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
|
+
if (expoModulesCorePlugin.exists()) {
|
|
11
|
+
apply from: expoModulesCorePlugin
|
|
12
|
+
applyKotlinExpoModulesCorePlugin()
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
10
16
|
ext.safeExtGet = { prop, fallback ->
|
|
11
17
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
// Ensures backward compatibility
|
|
21
|
+
ext.getKotlinVersion = {
|
|
22
|
+
if (ext.has("kotlinVersion")) {
|
|
23
|
+
ext.kotlinVersion()
|
|
24
|
+
} else {
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
repositories {
|
|
15
30
|
mavenCentral()
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
dependencies {
|
|
19
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
34
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
|
|
@@ -44,22 +59,22 @@ afterEvaluate {
|
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
android {
|
|
47
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
48
63
|
|
|
49
64
|
compileOptions {
|
|
50
|
-
sourceCompatibility JavaVersion.
|
|
51
|
-
targetCompatibility JavaVersion.
|
|
65
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
66
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
52
67
|
}
|
|
53
68
|
|
|
54
69
|
kotlinOptions {
|
|
55
|
-
jvmTarget = JavaVersion.
|
|
70
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
56
71
|
}
|
|
57
72
|
|
|
58
73
|
defaultConfig {
|
|
59
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
60
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
61
76
|
versionCode 21
|
|
62
|
-
versionName '0.
|
|
77
|
+
versionName '0.15.2'
|
|
63
78
|
}
|
|
64
79
|
|
|
65
80
|
lintOptions {
|
|
@@ -69,16 +84,15 @@ android {
|
|
|
69
84
|
|
|
70
85
|
dependencies {
|
|
71
86
|
implementation project(':expo-modules-core')
|
|
72
|
-
implementation project(':unimodules-task-manager-interface')
|
|
73
87
|
|
|
74
88
|
api 'androidx.core:core:1.5.0'
|
|
75
89
|
api 'androidx.lifecycle:lifecycle-runtime:2.2.0'
|
|
76
90
|
api 'androidx.lifecycle:lifecycle-process:2.2.0'
|
|
77
91
|
api 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
|
|
78
92
|
|
|
79
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
93
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
80
94
|
|
|
81
|
-
api 'com.google.firebase:firebase-messaging:
|
|
95
|
+
api 'com.google.firebase:firebase-messaging:21.1.0'
|
|
82
96
|
|
|
83
97
|
api 'me.leolin:ShortcutBadger:1.1.22@aar'
|
|
84
98
|
}
|
|
@@ -12,11 +12,6 @@ import androidx.lifecycle.ProcessLifecycleOwner;
|
|
|
12
12
|
|
|
13
13
|
import org.json.JSONException;
|
|
14
14
|
import org.json.JSONObject;
|
|
15
|
-
import org.unimodules.interfaces.taskManager.TaskConsumer;
|
|
16
|
-
import org.unimodules.interfaces.taskManager.TaskConsumerInterface;
|
|
17
|
-
import org.unimodules.interfaces.taskManager.TaskExecutionCallback;
|
|
18
|
-
import org.unimodules.interfaces.taskManager.TaskInterface;
|
|
19
|
-
import org.unimodules.interfaces.taskManager.TaskManagerUtilsInterface;
|
|
20
15
|
|
|
21
16
|
import java.util.Collections;
|
|
22
17
|
import java.util.List;
|
|
@@ -24,6 +19,11 @@ import java.util.Map;
|
|
|
24
19
|
|
|
25
20
|
import expo.modules.notifications.notifications.NotificationSerializer;
|
|
26
21
|
import expo.modules.notifications.service.delegates.FirebaseMessagingDelegate;
|
|
22
|
+
import expo.modules.interfaces.taskManager.TaskConsumer;
|
|
23
|
+
import expo.modules.interfaces.taskManager.TaskConsumerInterface;
|
|
24
|
+
import expo.modules.interfaces.taskManager.TaskExecutionCallback;
|
|
25
|
+
import expo.modules.interfaces.taskManager.TaskInterface;
|
|
26
|
+
import expo.modules.interfaces.taskManager.TaskManagerUtilsInterface;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Represents a task to be run when the app is backgrounded and receives a remote push
|
|
@@ -6,7 +6,7 @@ import expo.modules.core.ExportedModule;
|
|
|
6
6
|
import expo.modules.core.ModuleRegistry;
|
|
7
7
|
import expo.modules.core.Promise;
|
|
8
8
|
import expo.modules.core.interfaces.ExpoMethod;
|
|
9
|
-
import
|
|
9
|
+
import expo.modules.interfaces.taskManager.TaskManagerInterface;
|
|
10
10
|
|
|
11
11
|
import java.util.Collections;
|
|
12
12
|
|
|
@@ -7,20 +7,10 @@ import android.content.Context
|
|
|
7
7
|
import android.content.Intent
|
|
8
8
|
import android.content.pm.ActivityInfo
|
|
9
9
|
import android.net.Uri
|
|
10
|
-
import android.os
|
|
11
|
-
import android.os.Parcel
|
|
12
|
-
import android.os.Parcelable
|
|
13
|
-
import android.os.ResultReceiver
|
|
10
|
+
import android.os.*
|
|
14
11
|
import android.util.Log
|
|
15
12
|
import androidx.core.app.RemoteInput
|
|
16
|
-
import expo.modules.notifications.notifications.model
|
|
17
|
-
import expo.modules.notifications.notifications.model.NotificationAction
|
|
18
|
-
import expo.modules.notifications.notifications.model.NotificationBehavior
|
|
19
|
-
import expo.modules.notifications.notifications.model.NotificationCategory
|
|
20
|
-
import expo.modules.notifications.notifications.model.NotificationRequest
|
|
21
|
-
import expo.modules.notifications.notifications.model.NotificationResponse
|
|
22
|
-
import expo.modules.notifications.notifications.model.TextInputNotificationAction
|
|
23
|
-
import expo.modules.notifications.notifications.model.TextInputNotificationResponse
|
|
13
|
+
import expo.modules.notifications.notifications.model.*
|
|
24
14
|
import expo.modules.notifications.service.delegates.ExpoCategoriesDelegate
|
|
25
15
|
import expo.modules.notifications.service.delegates.ExpoHandlingDelegate
|
|
26
16
|
import expo.modules.notifications.service.delegates.ExpoPresentationDelegate
|
|
@@ -424,11 +414,13 @@ open class NotificationsService : BroadcastReceiver() {
|
|
|
424
414
|
intent.putExtra(IDENTIFIER_KEY, identifier)
|
|
425
415
|
}
|
|
426
416
|
|
|
417
|
+
// We're defaulting to the behaviour prior API 31 (mutable) even though Android recommends immutability
|
|
418
|
+
val mutableFlag = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0
|
|
427
419
|
return PendingIntent.getBroadcast(
|
|
428
420
|
context,
|
|
429
421
|
intent.component?.className?.hashCode() ?: NotificationsService::class.java.hashCode(),
|
|
430
422
|
intent,
|
|
431
|
-
PendingIntent.FLAG_UPDATE_CURRENT
|
|
423
|
+
PendingIntent.FLAG_UPDATE_CURRENT or mutableFlag
|
|
432
424
|
)
|
|
433
425
|
}
|
|
434
426
|
|
|
@@ -458,11 +450,13 @@ open class NotificationsService : BroadcastReceiver() {
|
|
|
458
450
|
intent.putExtra(NOTIFICATION_ACTION_KEY, action as Parcelable)
|
|
459
451
|
}
|
|
460
452
|
|
|
453
|
+
// We're defaulting to the behaviour prior API 31 (mutable) even though Android recommends immutability
|
|
454
|
+
val mutableFlag = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0
|
|
461
455
|
return PendingIntent.getBroadcast(
|
|
462
456
|
context,
|
|
463
457
|
intent.component?.className?.hashCode() ?: NotificationsService::class.java.hashCode(),
|
|
464
458
|
intent,
|
|
465
|
-
PendingIntent.FLAG_UPDATE_CURRENT
|
|
459
|
+
PendingIntent.FLAG_UPDATE_CURRENT or mutableFlag
|
|
466
460
|
)
|
|
467
461
|
}
|
|
468
462
|
|
package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoSchedulingDelegate.kt
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
package expo.modules.notifications.service.delegates
|
|
2
2
|
|
|
3
3
|
import android.app.AlarmManager
|
|
4
|
+
import android.app.PendingIntent
|
|
4
5
|
import android.content.Context
|
|
6
|
+
import android.os.Build
|
|
5
7
|
import android.util.Log
|
|
6
8
|
import androidx.core.app.AlarmManagerCompat
|
|
7
9
|
import expo.modules.notifications.notifications.interfaces.SchedulableNotificationTrigger
|
|
@@ -57,12 +59,7 @@ class ExpoSchedulingDelegate(protected val context: Context) : SchedulingDelegat
|
|
|
57
59
|
NotificationsService.removeScheduledNotification(context, request.identifier)
|
|
58
60
|
} else {
|
|
59
61
|
store.saveNotificationRequest(request)
|
|
60
|
-
|
|
61
|
-
alarmManager,
|
|
62
|
-
AlarmManager.RTC_WAKEUP,
|
|
63
|
-
nextTriggerDate.time,
|
|
64
|
-
NotificationsService.createNotificationTrigger(context, request.identifier)
|
|
65
|
-
)
|
|
62
|
+
setupAlarm(nextTriggerDate.time, NotificationsService.createNotificationTrigger(context, request.identifier))
|
|
66
63
|
}
|
|
67
64
|
}
|
|
68
65
|
}
|
|
@@ -99,4 +96,22 @@ class ExpoSchedulingDelegate(protected val context: Context) : SchedulingDelegat
|
|
|
99
96
|
alarmManager.cancel(NotificationsService.createNotificationTrigger(context, it))
|
|
100
97
|
}
|
|
101
98
|
}
|
|
99
|
+
|
|
100
|
+
private fun setupAlarm(triggerAtMillis: Long, operation: PendingIntent) {
|
|
101
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || alarmManager.canScheduleExactAlarms()) {
|
|
102
|
+
AlarmManagerCompat.setExactAndAllowWhileIdle(
|
|
103
|
+
alarmManager,
|
|
104
|
+
AlarmManager.RTC_WAKEUP,
|
|
105
|
+
triggerAtMillis,
|
|
106
|
+
operation
|
|
107
|
+
)
|
|
108
|
+
} else {
|
|
109
|
+
AlarmManagerCompat.setAndAllowWhileIdle(
|
|
110
|
+
alarmManager,
|
|
111
|
+
AlarmManager.RTC_WAKEUP,
|
|
112
|
+
triggerAtMillis,
|
|
113
|
+
operation
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
102
117
|
}
|
|
@@ -5,8 +5,7 @@ import android.os.Bundle;
|
|
|
5
5
|
|
|
6
6
|
import com.google.android.gms.tasks.OnCompleteListener;
|
|
7
7
|
import com.google.android.gms.tasks.Task;
|
|
8
|
-
import com.google.firebase.
|
|
9
|
-
import com.google.firebase.iid.InstanceIdResult;
|
|
8
|
+
import com.google.firebase.messaging.FirebaseMessaging;
|
|
10
9
|
|
|
11
10
|
import expo.modules.core.ExportedModule;
|
|
12
11
|
import expo.modules.core.ModuleRegistry;
|
|
@@ -61,10 +60,10 @@ public class PushTokenModule extends ExportedModule implements PushTokenListener
|
|
|
61
60
|
*/
|
|
62
61
|
@ExpoMethod
|
|
63
62
|
public void getDevicePushTokenAsync(final Promise promise) {
|
|
64
|
-
|
|
65
|
-
.addOnCompleteListener(new OnCompleteListener<
|
|
63
|
+
FirebaseMessaging.getInstance().getToken()
|
|
64
|
+
.addOnCompleteListener(new OnCompleteListener<String>() {
|
|
66
65
|
@Override
|
|
67
|
-
public void onComplete(@NonNull Task<
|
|
66
|
+
public void onComplete(@NonNull Task<String> task) {
|
|
68
67
|
if (!task.isSuccessful() || task.getResult() == null) {
|
|
69
68
|
if (task.getException() == null) {
|
|
70
69
|
promise.reject(REGISTRATION_FAIL_CODE, "Fetching the token failed.");
|
|
@@ -74,7 +73,7 @@ public class PushTokenModule extends ExportedModule implements PushTokenListener
|
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
String token = task.getResult()
|
|
76
|
+
String token = task.getResult();
|
|
78
77
|
|
|
79
78
|
promise.resolve(token);
|
|
80
79
|
onNewToken(token);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundNotificationTasksModule.native.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;;AAE9F,wBAA6G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundNotificationTasksModule.types.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,iCAAkC,SAAQ,iBAAiB;IAC1E,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;AAED,oBAAY,4BAA4B;IACtC,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;CACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundNotificationTasksModule.web.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.web.ts"],"names":[],"mappings":";gCACoC,MAAM,GAAG,QAAQ,IAAI,CAAC;kCAGpB,MAAM,GAAG,QAAQ,IAAI,CAAC;;AAJ5D,wBAOE"}
|
package/build/BadgeModule.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeModule.d.ts","sourceRoot":"","sources":["../src/BadgeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;;AAElD,wBAGiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeModule.native.d.ts","sourceRoot":"","sources":["../src/BadgeModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;;AAElD,wBAQiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeModule.types.d.ts","sourceRoot":"","sources":["../src/BadgeModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,oBAAY,uBAAuB,GAAG,aAAa,CAAC;AACpD,aAAK,oBAAoB,GAAG,uBAAuB,GAAG,SAAS,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeModule.web.d.ts","sourceRoot":"","sources":["../src/BadgeModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,QAAA,MAAM,WAAW,EAAE,WAqBlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -15,3 +15,4 @@ export declare function setAutoServerRegistrationEnabledAsync(enabled: boolean):
|
|
|
15
15
|
* This function is exported only for testing purposes.
|
|
16
16
|
*/
|
|
17
17
|
export declare function __handlePersistedRegistrationInfoAsync(registrationInfo: string | null | undefined): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=DevicePushTokenAutoRegistration.fx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevicePushTokenAutoRegistration.fx.d.ts","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAiBnC;;GAEG;AACH,oBAAY,2BAA2B,GAAG;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,qCAAqC,CAAC,OAAO,EAAE,OAAO,iBAY3E;AAED;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,iBAiC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationCategoriesModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationCategoriesModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;;AAEpF,wBAAmG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationCategoriesModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationCategoriesModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,8BAA8B,EAAE,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACtE,4BAA4B,EAAE,CAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAAE,EAC7B,OAAO,CAAC,EAAE;QACR,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,KACE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,+BAA+B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationCategoriesModule.web.d.ts","sourceRoot":"","sources":["../src/NotificationCategoriesModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;;sCAGjB,QAAQ,IAAI,CAAC;6CAIvC,MAAM,WACT,kBAAkB,EAAE,iCAE5B,QAAQ,IAAI,CAAC;gDAGkC,MAAM,GAAG,QAAQ,IAAI,CAAC;;AAX1E,wBAcE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelGroupManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;;AAE1F,wBAGqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelGroupManager.native.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;;AAE1F,wBAAgH"}
|
|
@@ -17,3 +17,4 @@ export interface NotificationChannelGroupManager extends ProxyNativeModule {
|
|
|
17
17
|
setNotificationChannelGroupAsync?: (groupId: string, group: NotificationChannelGroupInput) => Promise<NotificationChannelGroup | null>;
|
|
18
18
|
deleteNotificationChannelGroupAsync?: (groupId: string) => Promise<void>;
|
|
19
19
|
}
|
|
20
|
+
//# sourceMappingURL=NotificationChannelGroupManager.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelGroupManager.types.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,+BAAgC,SAAQ,iBAAiB;IACxE,iCAAiC,CAAC,EAAE,MAAM,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC9E,gCAAgC,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;IACjG,gCAAgC,CAAC,EAAE,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,6BAA6B,KACjC,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;IAC9C,mCAAmC,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;;AAEhF,wBAGgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelManager.native.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;;AAEhF,wBAAsG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelManager.types.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -11,3 +11,4 @@ export declare function requestPermissionsAsync(permissions?: NotificationPermis
|
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
export declare const usePermissions: (options?: import("expo-modules-core").PermissionHookOptions<NotificationPermissionsRequest> | undefined) => [NotificationPermissionsStatus | null, () => Promise<NotificationPermissionsStatus>, () => Promise<NotificationPermissionsStatus>];
|
|
14
|
+
//# sourceMappingURL=NotificationPermissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPermissions.d.ts","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AAGzC,wBAAsB,mBAAmB,2CAMxC;AAED,wBAAsB,uBAAuB,CAAC,WAAW,CAAC,EAAE,8BAA8B,0CAczF;AAGD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,iPAMzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPermissions.types.d.ts","sourceRoot":"","sources":["../src/NotificationPermissions.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,oBAAY,aAAa;IACvB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;CACV;AAED,oBAAY,iBAAiB;IAC3B,KAAK,IAAI;IACT,MAAM,IAAI;IACV,kBAAkB,IAAI;CACvB;AAED,oBAAY,sBAAsB;IAChC,cAAc,IAAI;IAClB,MAAM,IAAI;IACV,UAAU,IAAI;IACd,WAAW,IAAI;IACf,SAAS,IAAI;CACd;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACvE,OAAO,CAAC,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,MAAM,EAAE,sBAAsB,CAAC;QAC/B,iCAAiC,EAAE,OAAO,GAAG,IAAI,CAAC;QAClD,yBAAyB,EAAE,OAAO,GAAG,IAAI,CAAC;QAC1C,sBAAsB,EAAE,OAAO,GAAG,IAAI,CAAC;QACvC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QACtC,UAAU,EAAE,aAAa,CAAC;QAC1B,cAAc,CAAC,EAAE,iBAAiB,CAAC;QACnC,+BAA+B,CAAC,EAAE,OAAO,CAAC;QAC1C,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACtC,CAAC;CACH;AAED,MAAM,WAAW,iCAAiC;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,oCAAoC;CAAG;AAExD,oBAAY,oCAAoC,GAC5C,iCAAiC,GACjC,oCAAoC,CAAC;AAEzC,MAAM,WAAW,8BAA8B;IAC7C,GAAG,CAAC,EAAE,iCAAiC,CAAC;IACxC,OAAO,CAAC,EAAE,oCAAoC,CAAC;CAChD"}
|