expo-notifications 0.31.5-canary-20250811-5c940c0 → 0.32.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 -13
- package/android/build.gradle +2 -2
- package/build/NotificationsEmitter.d.ts +1 -9
- package/build/NotificationsEmitter.d.ts.map +1 -1
- package/build/NotificationsEmitter.js +1 -17
- package/build/NotificationsEmitter.js.map +1 -1
- package/build/TokenEmitter.d.ts +0 -8
- package/build/TokenEmitter.d.ts.map +1 -1
- package/build/TokenEmitter.js +0 -11
- package/build/TokenEmitter.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/EXNotifications/Notifications/Background/BackgroundModule.swift +3 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.module → 0.32.0/expo.modules.notifications-0.32.0.module} +18 -18
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.pom → 0.32.0/expo.modules.notifications-0.32.0.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.32.0/expo.modules.notifications-0.32.0.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512 +1 -1
- package/package.json +8 -7
- package/src/NotificationsEmitter.ts +1 -21
- package/src/TokenEmitter.ts +0 -14
- package/src/index.ts +0 -1
- package/build/presentNotificationAsync.d.ts +0 -14
- package/build/presentNotificationAsync.d.ts.map +0 -1
- package/build/presentNotificationAsync.js +0 -16
- package/build/presentNotificationAsync.js.map +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0.pom.sha512 +0 -1
- package/src/presentNotificationAsync.ts +0 -23
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0-sources.jar → 0.32.0/expo.modules.notifications-0.32.0-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0-sources.jar.md5 → 0.32.0/expo.modules.notifications-0.32.0-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0-sources.jar.sha1 → 0.32.0/expo.modules.notifications-0.32.0-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0-sources.jar.sha256 → 0.32.0/expo.modules.notifications-0.32.0-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.31.5-canary-20250811-5c940c0/expo.modules.notifications-0.31.5-canary-20250811-5c940c0-sources.jar.sha512 → 0.32.0/expo.modules.notifications-0.32.0-sources.jar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,10 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
### 🐛 Bug fixes
|
|
10
10
|
|
|
11
|
-
- [android] add missing proguard-rules for `expo-notifications` ([#37833](https://github.com/expo/expo/pull/37833) by [@chrfalch](https://github.com/chrfalch))
|
|
12
|
-
|
|
13
11
|
### 💡 Others
|
|
14
12
|
|
|
13
|
+
## 0.32.0 — 2025-08-13
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- remove deprecated function exports ([#38782](https://github.com/expo/expo/pull/38782) by [@vonovak](https://github.com/vonovak))
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- [android] add missing proguard-rules for `expo-notifications` ([#37833](https://github.com/expo/expo/pull/37833) by [@chrfalch](https://github.com/chrfalch))
|
|
22
|
+
- [iOS] Rethrow obj-c exception as swift error. ([#38714](https://github.com/expo/expo/pull/38714) by [@jakex7](https://github.com/jakex7))
|
|
23
|
+
|
|
15
24
|
## 0.31.4 - 2025-07-05
|
|
16
25
|
|
|
17
26
|
_This version does not introduce any user-facing changes._
|
|
@@ -684,12 +693,8 @@ _This version does not introduce any user-facing changes._
|
|
|
684
693
|
|
|
685
694
|
- Changed the way `PermissionResponse.status` is calculated on iOS. Previously, it returns the numeric value of `UMPermissionStatus` which does not match the TypeScript enum declaration. ([#10513](https://github.com/expo/expo/pull/10513) by [@cHaLkdusT](https://github.com/cHaLkdusT))
|
|
686
695
|
- Changed the way `NotificationContent.data` is calculated on iOS. Previously it was the contents of remote notification payload with all entries from under `"body"` moved from under `"body"` to root level. Now it's the sole unchanged contents of `payload["body"]`. Other fields of the payload can now be accessed on iOS through `PushNotificationTrigger.payload` (similarly to how other fields of native remote message can be accessed on Android under `PushNotificationTrigger.remoteMessage`). ([#10453](https://github.com/expo/expo/pull/10453) by [@sjchmiela](https://github.com/sjchmiela))
|
|
687
|
-
- Changed class responsible for handling Firebase events from `FirebaseMessagingService` to `.service.NotificationsService` on Android. ([#10558](https://github.com/expo/expo/pull/10558) by [@sjchmiela](https://github.com/sjchmiela))
|
|
688
|
-
|
|
689
|
-
> Note that this change most probably will not affect you — it only affects projects that override `FirebaseMessagingService` to implement some custom handling logic.
|
|
690
|
-
- Changed how you can override ways in which a notification is reinterpreted from a [`StatusBarNotification`](https://developer.android.com/reference/android/service/notification/StatusBarNotification) and in which a [`Notification`](https://developer.android.com/reference/android/app/Notification.html?hl=en) is built from defining an `expo.modules.notifications#NotificationsScoper` meta-data value in `AndroidManifest.xml` to implementing a `BroadcastReceiver` subclassing `NotificationsService` delegating those responsibilities to your custom `PresentationDelegate` instance. ([#10558](https://github.com/expo/expo/pull/10558) by [@sjchmiela](https://github.com/sjchmiela))
|
|
691
|
-
|
|
692
|
-
> Note that this change most probably will not affect you — it only affects projects that override those methods to implement some custom handling logic.
|
|
696
|
+
- Changed class responsible for handling Firebase events from `FirebaseMessagingService` to `.service.NotificationsService` on Android. Note that this change most probably will not affect you — it only affects projects that override `FirebaseMessagingService` to implement some custom handling logic. ([#10558](https://github.com/expo/expo/pull/10558) by [@sjchmiela](https://github.com/sjchmiela))
|
|
697
|
+
- Changed how you can override ways in which a notification is reinterpreted from a [`StatusBarNotification`](https://developer.android.com/reference/android/service/notification/StatusBarNotification) and in which a [`Notification`](https://developer.android.com/reference/android/app/Notification.html?hl=en) is built from defining an `expo.modules.notifications#NotificationsScoper` meta-data value in `AndroidManifest.xml` to implementing a `BroadcastReceiver` subclassing `NotificationsService` delegating those responsibilities to your custom `PresentationDelegate` instance. Note that this change most probably will not affect you — it only affects projects that override those methods to implement some custom handling logic. ([#10558](https://github.com/expo/expo/pull/10558) by [@sjchmiela](https://github.com/sjchmiela))
|
|
693
698
|
- Removed `removeAllNotificationListeners` method. You can (and should) still remove listeners using `remove` method on `Subscription` objects returned by `addNotification…Listener`. ([#10883](https://github.com/expo/expo/pull/10883) by [@sjchmiela](https://github.com/sjchmiela))
|
|
694
699
|
- Fixed device identifier being used to fetch Expo push token being backed up on Android which resulted in multiple devices having the same `deviceId` (and eventually, Expo push token). ([#11005](https://github.com/expo/expo/pull/11005) by [@sjchmiela](https://github.com/sjchmiela))
|
|
695
700
|
- Fixed device identifier used when fetching Expo push token being different than `Constants.installationId` in managed workflow apps which resulted in different Expo push tokens returned for the same experience across old and new Expo API and the device push token not being automatically updated on Expo push servers which lead to Expo push tokens corresponding to outdated Firebase tokens. ([#11005](https://github.com/expo/expo/pull/11005) by [@sjchmiela](https://github.com/sjchmiela))
|
|
@@ -794,16 +799,13 @@ _This version does not introduce any user-facing changes._
|
|
|
794
799
|
|
|
795
800
|
### 🎉 New features
|
|
796
801
|
|
|
797
|
-
- Added native permission requester that will let developers call `Permissions.getAsync(Permissions.NOTIFICATIONS)` (or `askAsync`) when this module is installed. ([#8486](https://github.com/expo/expo/pull/8486) by [@sjchmiela](https://github.com/sjchmiela))
|
|
798
|
-
|
|
799
|
-
> Note that the effect of this method is the same as if you called `Notifications.getPermissionsAsync()` (or `requestPermissionsAsync`) and then `Notifications.getDevicePushTokenAsync()`—it tries to both ask the user for user-facing notifications permissions and then tries to register the device for remote notifications. We are planning to deprecate the `.NOTIFICATIONS` permission soon.
|
|
802
|
+
- Added native permission requester that will let developers call `Permissions.getAsync(Permissions.NOTIFICATIONS)` (or `askAsync`) when this module is installed. Note that the effect of this method is the same as if you called `Notifications.getPermissionsAsync()` (or `requestPermissionsAsync`) and then `Notifications.getDevicePushTokenAsync()`—it tries to both ask the user for user-facing notifications permissions and then tries to register the device for remote notifications. We are planning to deprecate the `.NOTIFICATIONS` permission soon. ([#8486](https://github.com/expo/expo/pull/8486) by [@sjchmiela](https://github.com/sjchmiela))
|
|
800
803
|
|
|
801
804
|
## 0.2.0 — 2020-05-27
|
|
802
805
|
|
|
803
806
|
### 🛠 Breaking changes
|
|
804
807
|
|
|
805
|
-
-
|
|
806
|
-
- Changed the default notification behavior on Android to be automatically dismissed when clicked. This is customizable with the `autoDismiss` parameter of `NotificationContentInput`. ([#8241](https://github.com/expo/expo/pull/8241) by [@thorbenprimke](https://github.com/thorbenprimke))
|
|
808
|
+
- Changed the default notification behavior on Android to be automatically dismissed when clicked. This is customizable with the `autoDismiss` parameter of `NotificationContentInput`. Note that this may or may not be a breaking change for you — if you'd expect the notification to be automatically dismissed when tapped on this is a bug fix and a new feature (fixes inconsistency between platforms as on iOS this is the only supported behavior; adds the ability to customize the behavior on Android). If you'd expect the notification to only be dismissed at your will this is a breaking change and you'll need to add `autoDismiss: false` to your notification content inputs. ([#8241](https://github.com/expo/expo/pull/8241) by [@thorbenprimke](https://github.com/thorbenprimke))
|
|
807
809
|
|
|
808
810
|
### 🎉 New features
|
|
809
811
|
|
package/android/build.gradle
CHANGED
|
@@ -5,13 +5,13 @@ plugins {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
group = 'host.exp.exponent'
|
|
8
|
-
version = '0.
|
|
8
|
+
version = '0.32.0'
|
|
9
9
|
|
|
10
10
|
android {
|
|
11
11
|
namespace "expo.modules.notifications"
|
|
12
12
|
defaultConfig {
|
|
13
13
|
versionCode 21
|
|
14
|
-
versionName '0.
|
|
14
|
+
versionName '0.32.0'
|
|
15
15
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -63,15 +63,7 @@ export declare function addNotificationsDroppedListener(listener: () => void): E
|
|
|
63
63
|
*/
|
|
64
64
|
export declare function addNotificationResponseReceivedListener(listener: (event: NotificationResponse) => void): EventSubscription;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* Removes a notification subscription returned by an `addNotificationListener` call.
|
|
69
|
-
* @param subscription A subscription returned by `addNotificationListener` method.
|
|
70
|
-
* @header listen
|
|
71
|
-
*/
|
|
72
|
-
export declare function removeNotificationSubscription(subscription: EventSubscription): void;
|
|
73
|
-
/**
|
|
74
|
-
* Gets the notification response that was received most recently
|
|
66
|
+
* Gets the notification response received most recently
|
|
75
67
|
* (a notification response designates an interaction with a notification, such as tapping on it).
|
|
76
68
|
*
|
|
77
69
|
* - `null` - if no notification response has been received yet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitter.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,iBAAiB,EAAuB,MAAM,mBAAmB,CAAC;AAEpG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAa3E,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AAEtF;;;;;;;;;;;;;;;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C,IAAI,CAAC,CAExE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAOpD;AAED;;GAEG;AACH,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,iBAAiB,CAE9F"}
|
|
@@ -83,23 +83,7 @@ export function addNotificationResponseReceivedListener(listener) {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* Removes a notification subscription returned by an `addNotificationListener` call.
|
|
89
|
-
* @param subscription A subscription returned by `addNotificationListener` method.
|
|
90
|
-
* @header listen
|
|
91
|
-
*/
|
|
92
|
-
export function removeNotificationSubscription(subscription) {
|
|
93
|
-
console.warn('`removeNotificationSubscription` is deprecated. Call `subscription.remove()` instead.');
|
|
94
|
-
if (typeof subscription?.remove === 'function') {
|
|
95
|
-
subscription.remove();
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
throw new Error(`removeNotificationSubscription: Provided value is not a subscription: ${subscription}`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Gets the notification response that was received most recently
|
|
86
|
+
* Gets the notification response received most recently
|
|
103
87
|
* (a notification response designates an interaction with a notification, such as tapping on it).
|
|
104
88
|
*
|
|
105
89
|
* - `null` - if no notification response has been received yet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitter.js","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA0B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,iCAAiC;AACjC,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;AAEnE,MAAM,+BAA+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H,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC;IACpD,OAAO,2BAA2B,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B;IACzC,IAAI,CAAC,0BAA0B,CAAC,2BAA2B,EAAE,CAAC;QAC5D,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,QAAQ,GAAG,0BAA0B,CAAC,2BAA2B,EAAE,CAAC;IAC1E,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/E,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC;IACtD,6BAA6B,EAAE,CAAC;AAClC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B;IAC3C,IAAI,CAAC,0BAA0B,CAAC,6BAA6B,EAAE,CAAC;QAC9D,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,+BAA+B,CAAC,CAAC;IACtF,CAAC;IACD,0BAA0B,CAAC,6BAA6B,EAAE,CAAC;IAC3D,wFAAwF;IACxF,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CAAC,QAAoB;IACzE,OAAO,OAAO,CAAC,WAAW,CAAO,qCAAqC,EAAE,QAAQ,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import { LegacyEventEmitter, type EventSubscription, UnavailabilityError } from 'expo-modules-core';\n\nimport { Notification, NotificationResponse } from './Notifications.types';\nimport NotificationsEmitterModule from './NotificationsEmitterModule';\nimport { mapNotification, mapNotificationResponse } from './utils/mapNotificationResponse';\n\n// Web uses SyntheticEventEmitter\nconst emitter = new LegacyEventEmitter(NotificationsEmitterModule);\n\nconst didReceiveNotificationEventName = 'onDidReceiveNotification';\nconst didDropNotificationsEventName = 'onNotificationsDeleted';\nconst didReceiveNotificationResponseEventName = 'onDidReceiveNotificationResponse';\nconst didClearNotificationResponseEventName = 'onDidClearNotificationResponse';\n\n// @docsMissing\nexport const DEFAULT_ACTION_IDENTIFIER = 'expo.modules.notifications.actions.DEFAULT';\n\n/**\n * Listeners registered by this method will be called whenever a notification is received while the app is running.\n * @param listener A function accepting a notification ([`Notification`](#notification)) as an argument.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @example Registering a notification listener using a React hook:\n * ```jsx\n * import React from 'react';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function App() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationReceivedListener(notification => {\n * console.log(notification);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationReceivedListener(\n listener: (event: Notification) => void\n): EventSubscription {\n return emitter.addListener<Notification>(\n didReceiveNotificationEventName,\n (notification: Notification) => {\n const mappedNotification = mapNotification(notification);\n listener(mappedNotification);\n }\n );\n}\n\n/**\n * Listeners registered by this method will be called whenever some notifications have been dropped by the server.\n * Applicable only to Firebase Cloud Messaging which we use as a notifications service on Android. It corresponds to `onDeletedMessages()` callback.\n * More information can be found in [Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).\n * @param listener A callback function.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @header listen\n */\nexport function addNotificationsDroppedListener(listener: () => void): EventSubscription {\n return emitter.addListener<void>(didDropNotificationsEventName, listener);\n}\n\n/**\n * Listeners registered by this method will be called whenever a user interacts with a notification (for example, taps on it).\n * @param listener A function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @example Register a notification responder listener:\n * ```jsx\n * import React from 'react';\n * import { Linking } from 'react-native';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function Container() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationResponseReceivedListener(response => {\n * const url = response.notification.request.content.data.url;\n * Linking.openURL(url);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationResponseReceivedListener(\n listener: (event: NotificationResponse) => void\n): EventSubscription {\n return emitter.addListener<NotificationResponse>(\n didReceiveNotificationResponseEventName,\n (response: NotificationResponse) => {\n const mappedResponse = mapNotificationResponse(response);\n listener(mappedResponse);\n }\n );\n}\n\n/**\n * @deprecated call `remove()` on the subscription object instead.\n *\n * Removes a notification subscription returned by an `addNotificationListener` call.\n * @param subscription A subscription returned by `addNotificationListener` method.\n * @header listen\n */\nexport function removeNotificationSubscription(subscription: EventSubscription) {\n console.warn(\n '`removeNotificationSubscription` is deprecated. Call `subscription.remove()` instead.'\n );\n if (typeof subscription?.remove === 'function') {\n subscription.remove();\n } else {\n throw new Error(\n `removeNotificationSubscription: Provided value is not a subscription: ${subscription}`\n );\n }\n}\n\n/**\n * Gets the notification response that was received most recently\n * (a notification response designates an interaction with a notification, such as tapping on it).\n *\n * - `null` - if no notification response has been received yet\n * - a [`NotificationResponse`](#notificationresponse) object - if a notification response was received\n */\nexport async function getLastNotificationResponseAsync(): Promise<NotificationResponse | null> {\n return getLastNotificationResponse();\n}\n\n/**\n * Gets the notification response that was received most recently\n * (a notification response designates an interaction with a notification, such as tapping on it).\n *\n * - `null` - if no notification response has been received yet\n * - a [`NotificationResponse`](#notificationresponse) object - if a notification response was received\n */\nexport function getLastNotificationResponse(): NotificationResponse | null {\n if (!NotificationsEmitterModule.getLastNotificationResponse) {\n throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponse');\n }\n const response = NotificationsEmitterModule.getLastNotificationResponse();\n const mappedResponse = response ? mapNotificationResponse(response) : response;\n return mappedResponse;\n}\n\n/**\n * Clears the notification response that was received most recently. May be used\n * when an app selects a route based on the notification response, and it is undesirable\n * to continue selecting the route after the response has already been handled.\n *\n * If a component is using the [`useLastNotificationResponse`](#uselastnotificationresponse) hook,\n * this call will also clear the value returned by the hook.\n *\n * @return A promise that resolves if the native call was successful.\n */\nexport async function clearLastNotificationResponseAsync(): Promise<void> {\n clearLastNotificationResponse();\n}\n\n/**\n * Clears the notification response that was received most recently. May be used\n * when an app selects a route based on the notification response, and it is undesirable\n * to continue selecting the route after the response has already been handled.\n *\n * If a component is using the [`useLastNotificationResponse`](#uselastnotificationresponse) hook,\n * this call will also clear the value returned by the hook.\n *\n */\nexport function clearLastNotificationResponse(): void {\n if (!NotificationsEmitterModule.clearLastNotificationResponse) {\n throw new UnavailabilityError('ExpoNotifications', 'clearLastNotificationResponse');\n }\n NotificationsEmitterModule.clearLastNotificationResponse();\n // Emit event to clear any useLastNotificationResponse hooks, after native call succeeds\n emitter.emit(didClearNotificationResponseEventName, []);\n}\n\n/**\n * @hidden\n */\nexport function addNotificationResponseClearedListener(listener: () => void): EventSubscription {\n return emitter.addListener<void>(didClearNotificationResponseEventName, listener);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NotificationsEmitter.js","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA0B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,iCAAiC;AACjC,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;AAEnE,MAAM,+BAA+B,GAAG,0BAA0B,CAAC;AACnE,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAC/D,MAAM,uCAAuC,GAAG,kCAAkC,CAAC;AACnF,MAAM,qCAAqC,G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,QAAQ,CAAC;IAC/E,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC;IACtD,6BAA6B,EAAE,CAAC;AAClC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B;IAC3C,IAAI,CAAC,0BAA0B,CAAC,6BAA6B,EAAE,CAAC;QAC9D,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,+BAA+B,CAAC,CAAC;IACtF,CAAC;IACD,0BAA0B,CAAC,6BAA6B,EAAE,CAAC;IAC3D,wFAAwF;IACxF,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CAAC,QAAoB;IACzE,OAAO,OAAO,CAAC,WAAW,CAAO,qCAAqC,EAAE,QAAQ,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import { LegacyEventEmitter, type EventSubscription, UnavailabilityError } from 'expo-modules-core';\n\nimport { Notification, NotificationResponse } from './Notifications.types';\nimport NotificationsEmitterModule from './NotificationsEmitterModule';\nimport { mapNotification, mapNotificationResponse } from './utils/mapNotificationResponse';\n\n// Web uses SyntheticEventEmitter\nconst emitter = new LegacyEventEmitter(NotificationsEmitterModule);\n\nconst didReceiveNotificationEventName = 'onDidReceiveNotification';\nconst didDropNotificationsEventName = 'onNotificationsDeleted';\nconst didReceiveNotificationResponseEventName = 'onDidReceiveNotificationResponse';\nconst didClearNotificationResponseEventName = 'onDidClearNotificationResponse';\n\n// @docsMissing\nexport const DEFAULT_ACTION_IDENTIFIER = 'expo.modules.notifications.actions.DEFAULT';\n\n/**\n * Listeners registered by this method will be called whenever a notification is received while the app is running.\n * @param listener A function accepting a notification ([`Notification`](#notification)) as an argument.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @example Registering a notification listener using a React hook:\n * ```jsx\n * import React from 'react';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function App() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationReceivedListener(notification => {\n * console.log(notification);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationReceivedListener(\n listener: (event: Notification) => void\n): EventSubscription {\n return emitter.addListener<Notification>(\n didReceiveNotificationEventName,\n (notification: Notification) => {\n const mappedNotification = mapNotification(notification);\n listener(mappedNotification);\n }\n );\n}\n\n/**\n * Listeners registered by this method will be called whenever some notifications have been dropped by the server.\n * Applicable only to Firebase Cloud Messaging which we use as a notifications service on Android. It corresponds to `onDeletedMessages()` callback.\n * More information can be found in [Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).\n * @param listener A callback function.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @header listen\n */\nexport function addNotificationsDroppedListener(listener: () => void): EventSubscription {\n return emitter.addListener<void>(didDropNotificationsEventName, listener);\n}\n\n/**\n * Listeners registered by this method will be called whenever a user interacts with a notification (for example, taps on it).\n * @param listener A function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @example Register a notification responder listener:\n * ```jsx\n * import React from 'react';\n * import { Linking } from 'react-native';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function Container() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationResponseReceivedListener(response => {\n * const url = response.notification.request.content.data.url;\n * Linking.openURL(url);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationResponseReceivedListener(\n listener: (event: NotificationResponse) => void\n): EventSubscription {\n return emitter.addListener<NotificationResponse>(\n didReceiveNotificationResponseEventName,\n (response: NotificationResponse) => {\n const mappedResponse = mapNotificationResponse(response);\n listener(mappedResponse);\n }\n );\n}\n\n/**\n * Gets the notification response received most recently\n * (a notification response designates an interaction with a notification, such as tapping on it).\n *\n * - `null` - if no notification response has been received yet\n * - a [`NotificationResponse`](#notificationresponse) object - if a notification response was received\n */\nexport async function getLastNotificationResponseAsync(): Promise<NotificationResponse | null> {\n return getLastNotificationResponse();\n}\n\n/**\n * Gets the notification response that was received most recently\n * (a notification response designates an interaction with a notification, such as tapping on it).\n *\n * - `null` - if no notification response has been received yet\n * - a [`NotificationResponse`](#notificationresponse) object - if a notification response was received\n */\nexport function getLastNotificationResponse(): NotificationResponse | null {\n if (!NotificationsEmitterModule.getLastNotificationResponse) {\n throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponse');\n }\n const response = NotificationsEmitterModule.getLastNotificationResponse();\n const mappedResponse = response ? mapNotificationResponse(response) : response;\n return mappedResponse;\n}\n\n/**\n * Clears the notification response that was received most recently. May be used\n * when an app selects a route based on the notification response, and it is undesirable\n * to continue selecting the route after the response has already been handled.\n *\n * If a component is using the [`useLastNotificationResponse`](#uselastnotificationresponse) hook,\n * this call will also clear the value returned by the hook.\n *\n * @return A promise that resolves if the native call was successful.\n */\nexport async function clearLastNotificationResponseAsync(): Promise<void> {\n clearLastNotificationResponse();\n}\n\n/**\n * Clears the notification response that was received most recently. May be used\n * when an app selects a route based on the notification response, and it is undesirable\n * to continue selecting the route after the response has already been handled.\n *\n * If a component is using the [`useLastNotificationResponse`](#uselastnotificationresponse) hook,\n * this call will also clear the value returned by the hook.\n *\n */\nexport function clearLastNotificationResponse(): void {\n if (!NotificationsEmitterModule.clearLastNotificationResponse) {\n throw new UnavailabilityError('ExpoNotifications', 'clearLastNotificationResponse');\n }\n NotificationsEmitterModule.clearLastNotificationResponse();\n // Emit event to clear any useLastNotificationResponse hooks, after native call succeeds\n emitter.emit(didClearNotificationResponseEventName, []);\n}\n\n/**\n * @hidden\n */\nexport function addNotificationResponseClearedListener(listener: () => void): EventSubscription {\n return emitter.addListener<void>(didClearNotificationResponseEventName, listener);\n}\n"]}
|
package/build/TokenEmitter.d.ts
CHANGED
|
@@ -33,12 +33,4 @@ export type PushTokenListener = (token: DevicePushToken) => void;
|
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
export declare function addPushTokenListener(listener: PushTokenListener): EventSubscription;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated call `remove()` on the subscription object instead.
|
|
38
|
-
*
|
|
39
|
-
* Removes a push token subscription returned by an `addPushTokenListener` call.
|
|
40
|
-
* @param subscription A subscription returned by `addPushTokenListener` method.
|
|
41
|
-
* @header fetch
|
|
42
|
-
*/
|
|
43
|
-
export declare function removePushTokenSubscription(subscription: EventSubscription): void;
|
|
44
36
|
//# sourceMappingURL=TokenEmitter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenEmitter.d.ts","sourceRoot":"","sources":["../src/TokenEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,iBAAiB,CAKnF
|
|
1
|
+
{"version":3,"file":"TokenEmitter.d.ts","sourceRoot":"","sources":["../src/TokenEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,iBAAiB,CAKnF"}
|
package/build/TokenEmitter.js
CHANGED
|
@@ -33,15 +33,4 @@ export function addPushTokenListener(listener) {
|
|
|
33
33
|
warnOfExpoGoPushUsage();
|
|
34
34
|
return PushTokenManager.addListener(newTokenEventName, ({ devicePushToken }) => listener({ data: devicePushToken, type: Platform.OS }));
|
|
35
35
|
}
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated call `remove()` on the subscription object instead.
|
|
38
|
-
*
|
|
39
|
-
* Removes a push token subscription returned by an `addPushTokenListener` call.
|
|
40
|
-
* @param subscription A subscription returned by `addPushTokenListener` method.
|
|
41
|
-
* @header fetch
|
|
42
|
-
*/
|
|
43
|
-
export function removePushTokenSubscription(subscription) {
|
|
44
|
-
console.warn('`removePushTokenSubscription` is deprecated. Call `subscription.remove()` instead.');
|
|
45
|
-
subscription.remove();
|
|
46
|
-
}
|
|
47
36
|
//# sourceMappingURL=TokenEmitter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenEmitter.js","sourceRoot":"","sources":["../src/TokenEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAShE,iCAAiC;AACjC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAA2B;IAC9D,qBAAqB,EAAE,CAAC;IACxB,OAAO,gBAAgB,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAC7E,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CACvD,CAAC;AACJ,CAAC
|
|
1
|
+
{"version":3,"file":"TokenEmitter.js","sourceRoot":"","sources":["../src/TokenEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAShE,iCAAiC;AACjC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAA2B;IAC9D,qBAAqB,EAAE,CAAC;IACxB,OAAO,gBAAgB,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAC7E,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CACvD,CAAC;AACJ,CAAC","sourcesContent":["import { type EventSubscription, Platform } from 'expo-modules-core';\n\nimport PushTokenManager from './PushTokenManager';\nimport { DevicePushToken } from './Tokens.types';\nimport { warnOfExpoGoPushUsage } from './warnOfExpoGoPushUsage';\n\n/**\n * A function accepting a device push token ([`DevicePushToken`](#devicepushtoken)) as an argument.\n * > **Note:** You should not call `getDevicePushTokenAsync` inside this function, as it triggers the listener and may lead to an infinite loop.\n * @header fetch\n */\nexport type PushTokenListener = (token: DevicePushToken) => void;\n\n// Web uses SyntheticEventEmitter\nconst newTokenEventName = 'onDevicePushToken';\n\n/**\n * In rare situations, a push token may be changed by the push notification service while the app is running.\n * When a token is rolled, the old one becomes invalid and sending notifications to it will fail.\n * A push token listener will let you handle this situation gracefully by registering the new token with your backend right away.\n * @param listener A function accepting a push token as an argument, it will be called whenever the push token changes.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @header fetch\n * @example Registering a push token listener using a React hook.\n * ```jsx\n * import React from 'react';\n * import * as Notifications from 'expo-notifications';\n *\n * import { registerDevicePushTokenAsync } from '../api';\n *\n * export default function App() {\n * React.useEffect(() => {\n * const subscription = Notifications.addPushTokenListener(registerDevicePushTokenAsync);\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n */\nexport function addPushTokenListener(listener: PushTokenListener): EventSubscription {\n warnOfExpoGoPushUsage();\n return PushTokenManager.addListener(newTokenEventName, ({ devicePushToken }) =>\n listener({ data: devicePushToken, type: Platform.OS })\n );\n}\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export { default as getDevicePushTokenAsync } from './getDevicePushTokenAsync';
|
|
|
2
2
|
export { default as unregisterForNotificationsAsync } from './unregisterForNotificationsAsync';
|
|
3
3
|
export { default as getExpoPushTokenAsync } from './getExpoPushTokenAsync';
|
|
4
4
|
export { default as getPresentedNotificationsAsync } from './getPresentedNotificationsAsync';
|
|
5
|
-
export { default as presentNotificationAsync } from './presentNotificationAsync';
|
|
6
5
|
export { default as dismissNotificationAsync } from './dismissNotificationAsync';
|
|
7
6
|
export { default as dismissAllNotificationsAsync } from './dismissAllNotificationsAsync';
|
|
8
7
|
export { default as getNotificationChannelsAsync } from './getNotificationChannelsAsync';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI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AM,6BAA6B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AACzG,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -11,7 +11,6 @@ export { default as getDevicePushTokenAsync } from './getDevicePushTokenAsync';
|
|
|
11
11
|
export { default as unregisterForNotificationsAsync } from './unregisterForNotificationsAsync';
|
|
12
12
|
export { default as getExpoPushTokenAsync } from './getExpoPushTokenAsync';
|
|
13
13
|
export { default as getPresentedNotificationsAsync } from './getPresentedNotificationsAsync';
|
|
14
|
-
export { default as presentNotificationAsync } from './presentNotificationAsync';
|
|
15
14
|
export { default as dismissNotificationAsync } from './dismissNotificationAsync';
|
|
16
15
|
export { default as dismissAllNotificationsAsync } from './dismissAllNotificationsAsync';
|
|
17
16
|
export { default as getNotificationChannelsAsync } from './getNotificationChannelsAsync';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,SAAS,oBAAoB;IAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,MAAM,CAAC;AACpG,CAAC;AAED,IAAI,iBAAiB,EAAE,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;IACnD,MAAM,OAAO,GACX,yEAAyE;QACzE,iHAAiH,CAAC;IACpH,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACxB,CAAC;AAED,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,SAAS,oBAAoB;IAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,MAAM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,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AACzG,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC","sourcesContent":["import { isRunningInExpoGo } from 'expo';\n\nfunction areWeTestingWithJest() {\n return process.env.JEST_WORKER_ID !== undefined || process.env.NODE_ENV?.toLowerCase() === 'test';\n}\n\nif (isRunningInExpoGo() && !areWeTestingWithJest()) {\n const message =\n '`expo-notifications` functionality is not fully supported in Expo Go:\\n' +\n 'We recommend you instead use a development build to avoid limitations. Learn more: https://expo.fyi/dev-client.';\n console.warn(message);\n}\n\nexport { default as getDevicePushTokenAsync } from './getDevicePushTokenAsync';\nexport { default as unregisterForNotificationsAsync } from './unregisterForNotificationsAsync';\nexport { default as getExpoPushTokenAsync } from './getExpoPushTokenAsync';\nexport { default as getPresentedNotificationsAsync } from './getPresentedNotificationsAsync';\nexport { default as dismissNotificationAsync } from './dismissNotificationAsync';\nexport { default as dismissAllNotificationsAsync } from './dismissAllNotificationsAsync';\nexport { default as getNotificationChannelsAsync } from './getNotificationChannelsAsync';\nexport { default as getNotificationChannelAsync } from './getNotificationChannelAsync';\nexport { default as setNotificationChannelAsync } from './setNotificationChannelAsync';\nexport { default as deleteNotificationChannelAsync } from './deleteNotificationChannelAsync';\nexport { default as getNotificationChannelGroupsAsync } from './getNotificationChannelGroupsAsync';\nexport { default as getNotificationChannelGroupAsync } from './getNotificationChannelGroupAsync';\nexport { default as setNotificationChannelGroupAsync } from './setNotificationChannelGroupAsync';\nexport { default as deleteNotificationChannelGroupAsync } from './deleteNotificationChannelGroupAsync';\nexport { default as getBadgeCountAsync } from './getBadgeCountAsync';\nexport { default as setBadgeCountAsync } from './setBadgeCountAsync';\nexport { default as getAllScheduledNotificationsAsync } from './getAllScheduledNotificationsAsync';\nexport { default as scheduleNotificationAsync } from './scheduleNotificationAsync';\nexport { default as cancelScheduledNotificationAsync } from './cancelScheduledNotificationAsync';\nexport { default as cancelAllScheduledNotificationsAsync } from './cancelAllScheduledNotificationsAsync';\nexport { default as getNotificationCategoriesAsync } from './getNotificationCategoriesAsync';\nexport { default as setNotificationCategoryAsync } from './setNotificationCategoryAsync';\nexport { default as deleteNotificationCategoryAsync } from './deleteNotificationCategoryAsync';\nexport { default as getNextTriggerDateAsync } from './getNextTriggerDateAsync';\nexport { default as useLastNotificationResponse } from './useLastNotificationResponse';\nexport { setAutoServerRegistrationEnabledAsync } from './DevicePushTokenAutoRegistration.fx';\nexport { default as registerTaskAsync } from './registerTaskAsync';\nexport { default as unregisterTaskAsync } from './unregisterTaskAsync';\nexport * from './TokenEmitter';\nexport * from './NotificationsEmitter';\nexport * from './NotificationsHandler';\nexport * from './NotificationPermissions';\nexport * from './NotificationChannelGroupManager.types';\nexport * from './NotificationChannelManager.types';\nexport * from './NotificationPermissions.types';\nexport * from './Notifications.types';\nexport * from './Tokens.types';\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -40,7 +40,9 @@ public class BackgroundModule: Module {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
AsyncFunction("unregisterTaskAsync") {(name: String, promise: Promise) in
|
|
43
|
-
|
|
43
|
+
try EXUtilities.catchException {
|
|
44
|
+
self.taskManager?.unregisterTask(withName: name, consumerClass: NotificationsBackgroundTaskConsumer.self)
|
|
45
|
+
}
|
|
44
46
|
promise.resolve(nil)
|
|
45
47
|
}
|
|
46
48
|
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4446303bba265ad7d48f69d66dd25947
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cedda8ff3be79e8e4d52a36b32d843266b4ebb1b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
54d880284e4c05bb815de98bc48ff6206e5f6ed87e79308ad90196bd2a5d105c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f9cde8d4f0a7f5cbe218c7115445766eec980e044a90562cbbf524c51a5e1ac0a007bb426e95c2c6ecb30da2c5e94d963e948a84693a8c961a38f60ec8f8b8a4
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.notifications",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.32.0",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"createdBy": {
|
|
12
12
|
"gradle": {
|
|
13
|
-
"version": "8.14"
|
|
13
|
+
"version": "8.14.3"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"variants": [
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.notifications-0.
|
|
28
|
-
"url": "expo.modules.notifications-0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.notifications-0.32.0.aar",
|
|
28
|
+
"url": "expo.modules.notifications-0.32.0.aar",
|
|
29
|
+
"size": 384693,
|
|
30
|
+
"sha512": "f9cde8d4f0a7f5cbe218c7115445766eec980e044a90562cbbf524c51a5e1ac0a007bb426e95c2c6ecb30da2c5e94d963e948a84693a8c961a38f60ec8f8b8a4",
|
|
31
|
+
"sha256": "54d880284e4c05bb815de98bc48ff6206e5f6ed87e79308ad90196bd2a5d105c",
|
|
32
|
+
"sha1": "cedda8ff3be79e8e4d52a36b32d843266b4ebb1b",
|
|
33
|
+
"md5": "4446303bba265ad7d48f69d66dd25947"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -122,13 +122,13 @@
|
|
|
122
122
|
],
|
|
123
123
|
"files": [
|
|
124
124
|
{
|
|
125
|
-
"name": "expo.modules.notifications-0.
|
|
126
|
-
"url": "expo.modules.notifications-0.
|
|
127
|
-
"size":
|
|
128
|
-
"sha512": "
|
|
129
|
-
"sha256": "
|
|
130
|
-
"sha1": "
|
|
131
|
-
"md5": "
|
|
125
|
+
"name": "expo.modules.notifications-0.32.0.aar",
|
|
126
|
+
"url": "expo.modules.notifications-0.32.0.aar",
|
|
127
|
+
"size": 384693,
|
|
128
|
+
"sha512": "f9cde8d4f0a7f5cbe218c7115445766eec980e044a90562cbbf524c51a5e1ac0a007bb426e95c2c6ecb30da2c5e94d963e948a84693a8c961a38f60ec8f8b8a4",
|
|
129
|
+
"sha256": "54d880284e4c05bb815de98bc48ff6206e5f6ed87e79308ad90196bd2a5d105c",
|
|
130
|
+
"sha1": "cedda8ff3be79e8e4d52a36b32d843266b4ebb1b",
|
|
131
|
+
"md5": "4446303bba265ad7d48f69d66dd25947"
|
|
132
132
|
}
|
|
133
133
|
]
|
|
134
134
|
},
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
},
|
|
143
143
|
"files": [
|
|
144
144
|
{
|
|
145
|
-
"name": "expo.modules.notifications-0.
|
|
146
|
-
"url": "expo.modules.notifications-0.
|
|
145
|
+
"name": "expo.modules.notifications-0.32.0-sources.jar",
|
|
146
|
+
"url": "expo.modules.notifications-0.32.0-sources.jar",
|
|
147
147
|
"size": 99407,
|
|
148
148
|
"sha512": "ad96d4d7ea7b0cecbdea1ce64b28e4dbf5267074af9d7d352bd9f866d67cc32310347a9e68712e8502b55a815890002007a154ca508c0451a61acee82865eb9e",
|
|
149
149
|
"sha256": "3d445a8ee9d150d620fafe8a452c8c74427a5d835ab1263cec7d4f0743ac8f3d",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0b85b6d4b8e65766709ccf800408a048
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
69aec3c9696241c8823e669033a353e6d17df166
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d2219320e1baf70e37b040db107236a20eb4dae36e1dea8de6778662b8287cd5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
35444c8fc7557408997d734e448669a7cdd91d741583ad20b06ccfa5aa935e051062745a813f8312705e7037aaf8a4691e91b6421fb87f115efa29661bbd6bea
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.notifications</artifactId>
|
|
12
|
-
<version>0.
|
|
12
|
+
<version>0.32.0</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.notifications</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d313980365607f2e74630be423f637f5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
eb640258608d626fba74bc8eca844d00ca534a17
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f43ca9def15863956205b540376904ef20cc0317ed408b6925d4bcd203d37252
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8b39f1b6b1a245fa05510947468f5adffa40c0835f8ac13208ddcc6de9716d14c5d0624b61d728620906f5d4fc67569b2d5e6c888ee5f2a036b4a8d9b526061d
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.notifications</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>0.
|
|
7
|
-
<release>0.
|
|
6
|
+
<latest>0.32.0</latest>
|
|
7
|
+
<release>0.32.0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>0.
|
|
9
|
+
<version>0.32.0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250813165922</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7818fdb161ec696b44a163f14e9d7339
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b74e2d324082034dd1eb0fa5b5816d6a55b14711
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
200aa5c65546f1b2746269d4fa9dfb2b63ace7385f5dce14fea1b3156f09a373
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3c6ca3a2ef0db9662fb5e3782b54959a18dd8b461572c36dda20d50474394dbe3998460c04343b32c96589ee3079743cb76f86d11911c5a8bfc51c942cb28198
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-notifications",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Provides an API to fetch push notification tokens and to present, schedule, receive, and respond to notifications.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -42,21 +42,22 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@expo/image-utils": "0.
|
|
45
|
+
"@expo/image-utils": "^0.8.0",
|
|
46
46
|
"@ide/backoff": "^1.0.0",
|
|
47
47
|
"abort-controller": "^3.0.0",
|
|
48
48
|
"assert": "^2.0.0",
|
|
49
49
|
"badgin": "^1.1.5",
|
|
50
|
-
"expo-application": "
|
|
51
|
-
"expo-constants": "
|
|
50
|
+
"expo-application": "~7.0.0",
|
|
51
|
+
"expo-constants": "~18.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"expo-module-scripts": "
|
|
54
|
+
"expo-module-scripts": "^5.0.0",
|
|
55
55
|
"memfs": "^3.2.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"expo": "
|
|
58
|
+
"expo": "*",
|
|
59
59
|
"react": "*",
|
|
60
60
|
"react-native": "*"
|
|
61
|
-
}
|
|
61
|
+
},
|
|
62
|
+
"gitHead": "cb7062e2c17d1fb09522834aaaac0e19b766df62"
|
|
62
63
|
}
|
|
@@ -102,27 +102,7 @@ export function addNotificationResponseReceivedListener(
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* Removes a notification subscription returned by an `addNotificationListener` call.
|
|
108
|
-
* @param subscription A subscription returned by `addNotificationListener` method.
|
|
109
|
-
* @header listen
|
|
110
|
-
*/
|
|
111
|
-
export function removeNotificationSubscription(subscription: EventSubscription) {
|
|
112
|
-
console.warn(
|
|
113
|
-
'`removeNotificationSubscription` is deprecated. Call `subscription.remove()` instead.'
|
|
114
|
-
);
|
|
115
|
-
if (typeof subscription?.remove === 'function') {
|
|
116
|
-
subscription.remove();
|
|
117
|
-
} else {
|
|
118
|
-
throw new Error(
|
|
119
|
-
`removeNotificationSubscription: Provided value is not a subscription: ${subscription}`
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Gets the notification response that was received most recently
|
|
105
|
+
* Gets the notification response received most recently
|
|
126
106
|
* (a notification response designates an interaction with a notification, such as tapping on it).
|
|
127
107
|
*
|
|
128
108
|
* - `null` - if no notification response has been received yet
|
package/src/TokenEmitter.ts
CHANGED
|
@@ -46,17 +46,3 @@ export function addPushTokenListener(listener: PushTokenListener): EventSubscrip
|
|
|
46
46
|
listener({ data: devicePushToken, type: Platform.OS })
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated call `remove()` on the subscription object instead.
|
|
52
|
-
*
|
|
53
|
-
* Removes a push token subscription returned by an `addPushTokenListener` call.
|
|
54
|
-
* @param subscription A subscription returned by `addPushTokenListener` method.
|
|
55
|
-
* @header fetch
|
|
56
|
-
*/
|
|
57
|
-
export function removePushTokenSubscription(subscription: EventSubscription) {
|
|
58
|
-
console.warn(
|
|
59
|
-
'`removePushTokenSubscription` is deprecated. Call `subscription.remove()` instead.'
|
|
60
|
-
);
|
|
61
|
-
subscription.remove();
|
|
62
|
-
}
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,6 @@ export { default as getDevicePushTokenAsync } from './getDevicePushTokenAsync';
|
|
|
15
15
|
export { default as unregisterForNotificationsAsync } from './unregisterForNotificationsAsync';
|
|
16
16
|
export { default as getExpoPushTokenAsync } from './getExpoPushTokenAsync';
|
|
17
17
|
export { default as getPresentedNotificationsAsync } from './getPresentedNotificationsAsync';
|
|
18
|
-
export { default as presentNotificationAsync } from './presentNotificationAsync';
|
|
19
18
|
export { default as dismissNotificationAsync } from './dismissNotificationAsync';
|
|
20
19
|
export { default as dismissAllNotificationsAsync } from './dismissAllNotificationsAsync';
|
|
21
20
|
export { default as getNotificationChannelsAsync } from './getNotificationChannelsAsync';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NotificationContentInput } from './Notifications.types';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*
|
|
5
|
-
* Schedules a notification for immediate trigger.
|
|
6
|
-
* @param content An object representing the notification content.
|
|
7
|
-
* @param identifier
|
|
8
|
-
* @return It returns a Promise resolving with the notification's identifier once the notification is successfully scheduled for immediate display.
|
|
9
|
-
* @header schedule
|
|
10
|
-
* @deprecated This method has been deprecated in favor of using an explicit `NotificationHandler` and the [`scheduleNotificationAsync`](#schedulenotificationasyncrequest) method.
|
|
11
|
-
* More information can be found in our [FYI document](https://expo.fyi/presenting-notifications-deprecated).
|
|
12
|
-
*/
|
|
13
|
-
export default function presentNotificationAsync(content: NotificationContentInput, identifier?: string): Promise<string>;
|
|
14
|
-
//# sourceMappingURL=presentNotificationAsync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presentNotificationAsync.d.ts","sourceRoot":"","sources":["../src/presentNotificationAsync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,wBAA8B,wBAAwB,CACpD,OAAO,EAAE,wBAAwB,EACjC,UAAU,GAAE,MAAkB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { uuid } from 'expo-modules-core';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*
|
|
5
|
-
* Schedules a notification for immediate trigger.
|
|
6
|
-
* @param content An object representing the notification content.
|
|
7
|
-
* @param identifier
|
|
8
|
-
* @return It returns a Promise resolving with the notification's identifier once the notification is successfully scheduled for immediate display.
|
|
9
|
-
* @header schedule
|
|
10
|
-
* @deprecated This method has been deprecated in favor of using an explicit `NotificationHandler` and the [`scheduleNotificationAsync`](#schedulenotificationasyncrequest) method.
|
|
11
|
-
* More information can be found in our [FYI document](https://expo.fyi/presenting-notifications-deprecated).
|
|
12
|
-
*/
|
|
13
|
-
export default async function presentNotificationAsync(content, identifier = uuid.v4()) {
|
|
14
|
-
throw new Error('`presentNotificationAsync` has been removed. Use `scheduleNotificationAsync` + an explicit notification handler. Read more at https://expo.fyi/presenting-notifications-deprecated.');
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=presentNotificationAsync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presentNotificationAsync.js","sourceRoot":"","sources":["../src/presentNotificationAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAIzC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,wBAAwB,CACpD,OAAiC,EACjC,aAAqB,IAAI,CAAC,EAAE,EAAE;IAE9B,MAAM,IAAI,KAAK,CACb,qLAAqL,CACtL,CAAC;AACJ,CAAC","sourcesContent":["import { uuid } from 'expo-modules-core';\n\nimport { NotificationContentInput } from './Notifications.types';\n\n/**\n * @hidden\n *\n * Schedules a notification for immediate trigger.\n * @param content An object representing the notification content.\n * @param identifier\n * @return It returns a Promise resolving with the notification's identifier once the notification is successfully scheduled for immediate display.\n * @header schedule\n * @deprecated This method has been deprecated in favor of using an explicit `NotificationHandler` and the [`scheduleNotificationAsync`](#schedulenotificationasyncrequest) method.\n * More information can be found in our [FYI document](https://expo.fyi/presenting-notifications-deprecated).\n */\nexport default async function presentNotificationAsync(\n content: NotificationContentInput,\n identifier: string = uuid.v4()\n): Promise<string> {\n throw new Error(\n '`presentNotificationAsync` has been removed. Use `scheduleNotificationAsync` + an explicit notification handler. Read more at https://expo.fyi/presenting-notifications-deprecated.'\n );\n}\n"]}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9412cb9242313d5323089d420f56bce5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
75eb1f9fef81d15af4f5cde84235e151877d4d4e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
eb9640e83d531aa030f9c3ed48a6e32ef50991351d7a669ffe791adab2787d32
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2a2fac9914d165719d3a457c9c31b4eea51a1451a79d4712eb8bd0c375b44d1ca6a3b3c86d61291bfd865ebbc31daa64b715e786ba9e707a1cc9cc73f101c353
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
634d9c93c4f58dd1dfdc5327635f8958
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
49706a2e0b5186f6be11e4bc4d2eda2dade52914
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e9d324530155c7321f0377dec436e75ff1ac9ce294444db78ffef4a6c7695519
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0539cdb481125f916ea8e1bbc31f7cd41800614c0590f58dfbaa05eeb4e51dbdbe1a87f96d1e4a71dcae80d37e3b8aef7201af4cb8e2b14774e5bb011d939559
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c1b1c3140910f061e10aac408803aa72
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1988a05ac54530ea6a53c52e278e3738349359ae
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
de1ee99dc2e1b849963603c57236770f891a0d6bad06e19ec76c7ef3535f0e0c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9310b2998dca282e38430cf1ae25855b7f4cc5de87f086af4c68a2421dfabe3cac4e59f0819b8d93f055934086449a7b32e3b65c04a0f9c953a05e86926c0140
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { uuid } from 'expo-modules-core';
|
|
2
|
-
|
|
3
|
-
import { NotificationContentInput } from './Notifications.types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*
|
|
8
|
-
* Schedules a notification for immediate trigger.
|
|
9
|
-
* @param content An object representing the notification content.
|
|
10
|
-
* @param identifier
|
|
11
|
-
* @return It returns a Promise resolving with the notification's identifier once the notification is successfully scheduled for immediate display.
|
|
12
|
-
* @header schedule
|
|
13
|
-
* @deprecated This method has been deprecated in favor of using an explicit `NotificationHandler` and the [`scheduleNotificationAsync`](#schedulenotificationasyncrequest) method.
|
|
14
|
-
* More information can be found in our [FYI document](https://expo.fyi/presenting-notifications-deprecated).
|
|
15
|
-
*/
|
|
16
|
-
export default async function presentNotificationAsync(
|
|
17
|
-
content: NotificationContentInput,
|
|
18
|
-
identifier: string = uuid.v4()
|
|
19
|
-
): Promise<string> {
|
|
20
|
-
throw new Error(
|
|
21
|
-
'`presentNotificationAsync` has been removed. Use `scheduleNotificationAsync` + an explicit notification handler. Read more at https://expo.fyi/presenting-notifications-deprecated.'
|
|
22
|
-
);
|
|
23
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|