expo-notifications 0.14.1 → 0.15.0
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 +15 -1
- package/README.md +20 -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/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/Info.plist +5 -5
- 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/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 0.
|
|
13
|
+
## 0.15.0 — 2022-04-18
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- 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))
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- 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))
|
|
22
|
+
|
|
23
|
+
### ⚠️ Notices
|
|
24
|
+
|
|
25
|
+
- 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))
|
|
26
|
+
|
|
27
|
+
## 0.14.1 - 2022-02-01
|
|
14
28
|
|
|
15
29
|
### 🐛 Bug fixes
|
|
16
30
|
|
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,7 +43,7 @@ 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
|
|
|
@@ -117,7 +117,7 @@ This module requires permission to subscribe to device boot. It's used to setup
|
|
|
117
117
|
|
|
118
118
|
### Config plugin setup (optional)
|
|
119
119
|
|
|
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.
|
|
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.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
121
|
|
|
122
122
|
```json
|
|
123
123
|
{
|
|
@@ -152,7 +152,7 @@ If you're using EAS Build, you can set your Android notification icon and color
|
|
|
152
152
|
|
|
153
153
|
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
154
|
|
|
155
|
-
- for Firebase Cloud Messaging, check out this guide: _[Uploading Server Credentials](https://docs.expo.
|
|
155
|
+
- for Firebase Cloud Messaging, check out this guide: _[Uploading Server Credentials](https://docs.expo.dev/push-notifications/using-fcm/#uploading-server-credentials)_,
|
|
156
156
|
- for APNS:
|
|
157
157
|
- run `expo credentials:manager` in the root of your application,
|
|
158
158
|
- 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 +216,7 @@ If the device you're experiencing this on hasn't been setup with a SIM card it l
|
|
|
216
216
|
|
|
217
217
|
### Setting custom notification sounds
|
|
218
218
|
|
|
219
|
-
Custom notification sounds are only supported when using [EAS Build](https://docs.expo.
|
|
219
|
+
Custom notification sounds are only supported when using [EAS Build](https://docs.expo.dev/build/introduction/), or in the bare workflow.
|
|
220
220
|
|
|
221
221
|
To add custom push notification sounds to your app, add the `expo-notifications` plugin to your `app.json` file:
|
|
222
222
|
|
|
@@ -364,7 +364,7 @@ The following methods are exported by the `expo-notifications` module:
|
|
|
364
364
|
|
|
365
365
|
## Custom notification icon and colors (Android only)
|
|
366
366
|
|
|
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.
|
|
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.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
368
|
|
|
369
369
|
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
370
|
|
|
@@ -390,9 +390,9 @@ export interface FirebaseData {
|
|
|
390
390
|
|
|
391
391
|
### `getExpoPushTokenAsync(options: ExpoTokenOptions): ExpoPushToken`
|
|
392
392
|
|
|
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.
|
|
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.dev/guides/push-notifications/).
|
|
394
394
|
|
|
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.
|
|
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.dev/push-notifications/push-notifications-setup/#credentials).
|
|
396
396
|
|
|
397
397
|
> **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
398
|
|
|
@@ -400,10 +400,10 @@ Returns an Expo token that can be used to send a push notification to this devic
|
|
|
400
400
|
|
|
401
401
|
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
402
|
|
|
403
|
-
- **experienceId (_string_)** -- The ID of the experience to which the token should be attributed. Defaults to [`Constants.manifest.id`](https://docs.expo.
|
|
403
|
+
- **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
404
|
- **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.
|
|
405
|
+
- **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`.
|
|
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.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
407
|
|
|
408
408
|
#### Returns
|
|
409
409
|
|
|
@@ -744,7 +744,7 @@ Notifications.setNotificationHandler({
|
|
|
744
744
|
|
|
745
745
|
### `registerTaskAsync(taskName: string): void`
|
|
746
746
|
|
|
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.
|
|
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.dev/versions/latest/sdk/task-manager/#taskmanagerdefinetasktaskname-task). Make sure you define it in the global scope.
|
|
748
748
|
|
|
749
749
|
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
750
|
|
|
@@ -754,18 +754,18 @@ The `taskName` argument is the string you passed to `TaskManager.defineTask` as
|
|
|
754
754
|
|
|
755
755
|
#### Examples
|
|
756
756
|
|
|
757
|
-
Implementing a notification handler that always shows the notification when it is received
|
|
758
|
-
|
|
759
757
|
```ts
|
|
758
|
+
import * as TaskManager from 'expo-task-manager';
|
|
760
759
|
import * as Notifications from 'expo-notifications';
|
|
761
760
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}),
|
|
761
|
+
const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';
|
|
762
|
+
|
|
763
|
+
TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
|
|
764
|
+
console.log('Received a notification in the background!');
|
|
765
|
+
// Do something with the notification data
|
|
768
766
|
});
|
|
767
|
+
|
|
768
|
+
Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);
|
|
769
769
|
```
|
|
770
770
|
|
|
771
771
|
### `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.0'
|
|
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.0'
|
|
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
|
|
|
@@ -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":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,oBAAY,6BAA6B;IACvC,OAAO,IAAI;IACX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,oBAAY,uBAAuB;IACjC,OAAO,IAAI;IACX,MAAM,IAAI;IACV,KAAK,IAAI;IACT,KAAK,IAAI;IACT,YAAY,IAAI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AAE,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,aAAK,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEnF,oBAAY,wBAAwB,GAAG,UAAU,CAC/C,IAAI,CACF,mBAAmB,EACjB,IAAI,GACJ,iBAAiB,GACjB,OAAO,CACV,GAAG;IAAE,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACrE,MAAM,GAAG,YAAY,CACtB,CAAC;AAEF,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,4BAA4B,CAAC,EAAE,MAAM,OAAO,CAAC,mBAAmB,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3E,2BAA2B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzF,2BAA2B,CAAC,EAAE,CAC5B,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,wBAAwB,KAC3C,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzC,8BAA8B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvE"}
|
|
@@ -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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPermissionsModule.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;;AAiEtF,wBAWmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPermissionsModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;;AAEtF,wBAA4G"}
|
|
@@ -4,3 +4,4 @@ export interface NotificationPermissionsModule extends ProxyNativeModule {
|
|
|
4
4
|
getPermissionsAsync?: () => Promise<NotificationPermissionsStatus>;
|
|
5
5
|
requestPermissionsAsync?: (request: NativeNotificationPermissionsRequest) => Promise<NotificationPermissionsStatus>;
|
|
6
6
|
}
|
|
7
|
+
//# sourceMappingURL=NotificationPermissionsModule.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPermissionsModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EACL,6BAA6B,EAC7B,oCAAoC,EACrC,MAAM,iCAAiC,CAAC;AAEzC,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,6BAA6B,CAAC,CAAC;IACnE,uBAAuB,CAAC,EAAE,CACxB,OAAO,EAAE,oCAAoC,KAC1C,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPresenterModule.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;;AAElF,wBAGiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPresenterModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;;AAElF,wBAAkG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPresenterModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,8BAA8B,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC/D,wBAAwB,CAAC,EAAE,CACzB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,4BAA4B,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationScheduler.d.ts","sourceRoot":"","sources":["../src/NotificationScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;;AAE5E,wBAGiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationScheduler.native.d.ts","sourceRoot":"","sources":["../src/NotificationScheduler.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;;AAE5E,wBAAkG"}
|
|
@@ -62,3 +62,4 @@ export interface DateTriggerInput {
|
|
|
62
62
|
timestamp: number;
|
|
63
63
|
}
|
|
64
64
|
export declare type NotificationTriggerInput = null | ChannelAwareTriggerInput | DateTriggerInput | CalendarTriggerInput | TimeIntervalTriggerInput | DailyTriggerInput | WeeklyTriggerInput | YearlyTriggerInput;
|
|
65
|
+
//# sourceMappingURL=NotificationScheduler.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationScheduler.types.d.ts","sourceRoot":"","sources":["../src/NotificationScheduler.types.ts"],"names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