@amazon-devices/expo-notifications 2.0.9000000000-rn-83
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/.eslintrc.js +2 -0
- package/CHANGELOG.md +478 -0
- package/LICENSE +7 -0
- package/README.kepler.md +3 -0
- package/README.md +2003 -0
- package/THIRD_PARTY_NOTICES.txt +4 -0
- package/android/build.gradle +125 -0
- package/android/src/main/AndroidManifest.xml +39 -0
- package/android/src/main/java/expo/modules/notifications/Exceptions.kt +22 -0
- package/android/src/main/java/expo/modules/notifications/NotificationsPackage.java +34 -0
- package/android/src/main/java/expo/modules/notifications/Utils.kt +19 -0
- package/android/src/main/java/expo/modules/notifications/badge/BadgeHelper.kt +24 -0
- package/android/src/main/java/expo/modules/notifications/badge/BadgeModule.kt +22 -0
- package/android/src/main/java/expo/modules/notifications/notifications/ArgumentsNotificationContentBuilder.java +149 -0
- package/android/src/main/java/expo/modules/notifications/notifications/JSONNotificationContentBuilder.java +203 -0
- package/android/src/main/java/expo/modules/notifications/notifications/NotificationManager.java +119 -0
- package/android/src/main/java/expo/modules/notifications/notifications/NotificationSerializer.java +202 -0
- package/android/src/main/java/expo/modules/notifications/notifications/RemoteMessageSerializer.java +104 -0
- package/android/src/main/java/expo/modules/notifications/notifications/SoundResolver.java +58 -0
- package/android/src/main/java/expo/modules/notifications/notifications/background/BackgroundRemoteNotificationTaskConsumer.java +123 -0
- package/android/src/main/java/expo/modules/notifications/notifications/background/ExpoBackgroundNotificationTasksModule.kt +33 -0
- package/android/src/main/java/expo/modules/notifications/notifications/categories/ExpoNotificationCategoriesModule.kt +149 -0
- package/android/src/main/java/expo/modules/notifications/notifications/categories/serializers/ExpoNotificationsCategoriesSerializer.java +67 -0
- package/android/src/main/java/expo/modules/notifications/notifications/categories/serializers/NotificationsCategoriesSerializer.java +11 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/AbstractNotificationsChannelsProvider.java +81 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/AndroidXNotificationsChannelsProvider.java +38 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/InvalidVibrationPatternException.java +14 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/NotificationChannelGroupManagerModule.kt +70 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/NotificationChannelManagerModule.kt +83 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/NotificationsChannelsProvider.java +13 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/managers/AndroidXNotificationsChannelGroupManager.java +67 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/managers/AndroidXNotificationsChannelManager.java +196 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/managers/NotificationsChannelGroupManager.java +28 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/managers/NotificationsChannelManager.java +28 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/serializers/ExpoNotificationsChannelGroupSerializer.java +55 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/serializers/ExpoNotificationsChannelSerializer.java +101 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/serializers/NotificationsChannelGroupSerializer.java +20 -0
- package/android/src/main/java/expo/modules/notifications/notifications/channels/serializers/NotificationsChannelSerializer.java +35 -0
- package/android/src/main/java/expo/modules/notifications/notifications/emitting/NotificationsEmitter.kt +78 -0
- package/android/src/main/java/expo/modules/notifications/notifications/enums/AudioContentType.java +45 -0
- package/android/src/main/java/expo/modules/notifications/notifications/enums/AudioUsage.java +55 -0
- package/android/src/main/java/expo/modules/notifications/notifications/enums/NotificationImportance.java +48 -0
- package/android/src/main/java/expo/modules/notifications/notifications/enums/NotificationPriority.java +51 -0
- package/android/src/main/java/expo/modules/notifications/notifications/enums/NotificationVisibility.java +44 -0
- package/android/src/main/java/expo/modules/notifications/notifications/handling/NotificationsHandler.kt +127 -0
- package/android/src/main/java/expo/modules/notifications/notifications/handling/SingleNotificationHandlerTask.java +131 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationBuilder.java +35 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationListener.java +37 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationManager.java +22 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationPresentationEffect.java +11 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationPresentationEffectsManager.java +7 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationTrigger.java +19 -0
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/SchedulableNotificationTrigger.java +20 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/Notification.java +59 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationAction.java +63 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationBehavior.java +84 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationCategory.java +61 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationContent.java +356 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationRequest.java +66 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationResponse.java +60 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/TextInputNotificationAction.java +42 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/TextInputNotificationResponse.java +42 -0
- package/android/src/main/java/expo/modules/notifications/notifications/model/triggers/FirebaseNotificationTrigger.java +61 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/ExpoNotificationPresentationEffectsManager.java +63 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/ExpoNotificationPresentationModule.kt +113 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/BaseNotificationBuilder.java +50 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/CategoryAwareNotificationBuilder.java +80 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/ChannelAwareNotificationBuilder.java +135 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java +295 -0
- package/android/src/main/java/expo/modules/notifications/notifications/presentation/effects/BaseNotificationEffect.java +53 -0
- package/android/src/main/java/expo/modules/notifications/notifications/scheduling/NotificationScheduler.kt +235 -0
- package/android/src/main/java/expo/modules/notifications/notifications/triggers/ChannelAwareTrigger.java +49 -0
- package/android/src/main/java/expo/modules/notifications/notifications/triggers/DailyTrigger.java +76 -0
- package/android/src/main/java/expo/modules/notifications/notifications/triggers/DateTrigger.java +64 -0
- package/android/src/main/java/expo/modules/notifications/notifications/triggers/TimeIntervalTrigger.java +87 -0
- package/android/src/main/java/expo/modules/notifications/notifications/triggers/WeeklyTrigger.java +85 -0
- package/android/src/main/java/expo/modules/notifications/notifications/triggers/YearlyTrigger.java +94 -0
- package/android/src/main/java/expo/modules/notifications/permissions/NotificationPermissionsModule.kt +124 -0
- package/android/src/main/java/expo/modules/notifications/serverregistration/InstallationId.java +134 -0
- package/android/src/main/java/expo/modules/notifications/serverregistration/RegistrationInfo.kt +24 -0
- package/android/src/main/java/expo/modules/notifications/serverregistration/ServerRegistrationModule.kt +32 -0
- package/android/src/main/java/expo/modules/notifications/service/ExpoFirebaseMessagingService.kt +15 -0
- package/android/src/main/java/expo/modules/notifications/service/NotificationForwarderActivity.kt +33 -0
- package/android/src/main/java/expo/modules/notifications/service/NotificationsService.kt +780 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/Base64Serialization.kt +33 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoCategoriesDelegate.kt +21 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoHandlingDelegate.kt +146 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoPresentationDelegate.kt +193 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoSchedulingDelegate.kt +117 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/FirebaseMessagingDelegate.kt +126 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/SharedPreferencesNotificationCategoriesStore.kt +106 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/SharedPreferencesNotificationsStore.kt +119 -0
- package/android/src/main/java/expo/modules/notifications/service/interfaces/CategoriesDelegate.kt +14 -0
- package/android/src/main/java/expo/modules/notifications/service/interfaces/FirebaseMessagingDelegate.kt +20 -0
- package/android/src/main/java/expo/modules/notifications/service/interfaces/HandlingDelegate.kt +10 -0
- package/android/src/main/java/expo/modules/notifications/service/interfaces/PresentationDelegate.kt +11 -0
- package/android/src/main/java/expo/modules/notifications/service/interfaces/SchedulingDelegate.kt +13 -0
- package/android/src/main/java/expo/modules/notifications/tokens/PushTokenManager.java +88 -0
- package/android/src/main/java/expo/modules/notifications/tokens/PushTokenModule.kt +91 -0
- package/android/src/main/java/expo/modules/notifications/tokens/interfaces/FirebaseTokenListener.java +16 -0
- package/android/src/main/java/expo/modules/notifications/tokens/interfaces/PushTokenListener.java +14 -0
- package/android/src/main/java/expo/modules/notifications/tokens/interfaces/PushTokenManager.java +22 -0
- package/android/src/main/res/values/strings.xml +4 -0
- package/app.plugin.js +1 -0
- package/build/BackgroundNotificationTasksModule.d.ts +4 -0
- package/build/BackgroundNotificationTasksModule.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.js +7 -0
- package/build/BackgroundNotificationTasksModule.js.map +1 -0
- package/build/BackgroundNotificationTasksModule.kepler.d.ts +3 -0
- package/build/BackgroundNotificationTasksModule.kepler.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.kepler.js +9 -0
- package/build/BackgroundNotificationTasksModule.kepler.js.map +1 -0
- package/build/BackgroundNotificationTasksModule.native.d.ts +4 -0
- package/build/BackgroundNotificationTasksModule.native.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.native.js +3 -0
- package/build/BackgroundNotificationTasksModule.native.js.map +1 -0
- package/build/BackgroundNotificationTasksModule.types.d.ts +11 -0
- package/build/BackgroundNotificationTasksModule.types.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.types.js +7 -0
- package/build/BackgroundNotificationTasksModule.types.js.map +1 -0
- package/build/BackgroundNotificationTasksModule.web.d.ts +6 -0
- package/build/BackgroundNotificationTasksModule.web.d.ts.map +1 -0
- package/build/BackgroundNotificationTasksModule.web.js +9 -0
- package/build/BackgroundNotificationTasksModule.web.js.map +1 -0
- package/build/BadgeModule.d.ts +4 -0
- package/build/BadgeModule.d.ts.map +1 -0
- package/build/BadgeModule.js +5 -0
- package/build/BadgeModule.js.map +1 -0
- package/build/BadgeModule.kepler.d.ts +3 -0
- package/build/BadgeModule.kepler.d.ts.map +1 -0
- package/build/BadgeModule.kepler.js +9 -0
- package/build/BadgeModule.kepler.js.map +1 -0
- package/build/BadgeModule.native.d.ts +4 -0
- package/build/BadgeModule.native.d.ts.map +1 -0
- package/build/BadgeModule.native.js +12 -0
- package/build/BadgeModule.native.js.map +1 -0
- package/build/BadgeModule.types.d.ts +10 -0
- package/build/BadgeModule.types.d.ts.map +1 -0
- package/build/BadgeModule.types.js +2 -0
- package/build/BadgeModule.types.js.map +1 -0
- package/build/BadgeModule.web.d.ts +4 -0
- package/build/BadgeModule.web.d.ts.map +1 -0
- package/build/BadgeModule.web.js +26 -0
- package/build/BadgeModule.web.js.map +1 -0
- package/build/DevicePushTokenAutoRegistration.fx.d.ts +15 -0
- package/build/DevicePushTokenAutoRegistration.fx.d.ts.map +1 -0
- package/build/DevicePushTokenAutoRegistration.fx.js +87 -0
- package/build/DevicePushTokenAutoRegistration.fx.js.map +1 -0
- package/build/NotificationCategoriesModule.d.ts +4 -0
- package/build/NotificationCategoriesModule.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.js +13 -0
- package/build/NotificationCategoriesModule.js.map +1 -0
- package/build/NotificationCategoriesModule.kepler.d.ts +3 -0
- package/build/NotificationCategoriesModule.kepler.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.kepler.js +10 -0
- package/build/NotificationCategoriesModule.kepler.js.map +1 -0
- package/build/NotificationCategoriesModule.native.d.ts +4 -0
- package/build/NotificationCategoriesModule.native.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.native.js +3 -0
- package/build/NotificationCategoriesModule.native.js.map +1 -0
- package/build/NotificationCategoriesModule.types.d.ts +17 -0
- package/build/NotificationCategoriesModule.types.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.types.js +2 -0
- package/build/NotificationCategoriesModule.types.js.map +1 -0
- package/build/NotificationCategoriesModule.web.d.ts +8 -0
- package/build/NotificationCategoriesModule.web.d.ts.map +1 -0
- package/build/NotificationCategoriesModule.web.js +12 -0
- package/build/NotificationCategoriesModule.web.js.map +1 -0
- package/build/NotificationChannelGroupManager.d.ts +4 -0
- package/build/NotificationChannelGroupManager.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.js +5 -0
- package/build/NotificationChannelGroupManager.js.map +1 -0
- package/build/NotificationChannelGroupManager.kepler.d.ts +3 -0
- package/build/NotificationChannelGroupManager.kepler.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.kepler.js +9 -0
- package/build/NotificationChannelGroupManager.kepler.js.map +1 -0
- package/build/NotificationChannelGroupManager.native.d.ts +4 -0
- package/build/NotificationChannelGroupManager.native.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.native.js +3 -0
- package/build/NotificationChannelGroupManager.native.js.map +1 -0
- package/build/NotificationChannelGroupManager.types.d.ts +28 -0
- package/build/NotificationChannelGroupManager.types.d.ts.map +1 -0
- package/build/NotificationChannelGroupManager.types.js +2 -0
- package/build/NotificationChannelGroupManager.types.js.map +1 -0
- package/build/NotificationChannelManager.d.ts +4 -0
- package/build/NotificationChannelManager.d.ts.map +1 -0
- package/build/NotificationChannelManager.js +5 -0
- package/build/NotificationChannelManager.js.map +1 -0
- package/build/NotificationChannelManager.kepler.d.ts +3 -0
- package/build/NotificationChannelManager.kepler.d.ts.map +1 -0
- package/build/NotificationChannelManager.kepler.js +9 -0
- package/build/NotificationChannelManager.kepler.js.map +1 -0
- package/build/NotificationChannelManager.native.d.ts +4 -0
- package/build/NotificationChannelManager.native.d.ts.map +1 -0
- package/build/NotificationChannelManager.native.js +3 -0
- package/build/NotificationChannelManager.native.js.map +1 -0
- package/build/NotificationChannelManager.types.d.ts +91 -0
- package/build/NotificationChannelManager.types.d.ts.map +1 -0
- package/build/NotificationChannelManager.types.js +53 -0
- package/build/NotificationChannelManager.types.js.map +1 -0
- package/build/NotificationPermissions.d.ts +56 -0
- package/build/NotificationPermissions.d.ts.map +1 -0
- package/build/NotificationPermissions.js +79 -0
- package/build/NotificationPermissions.js.map +1 -0
- package/build/NotificationPermissions.types.d.ts +94 -0
- package/build/NotificationPermissions.types.d.ts.map +1 -0
- package/build/NotificationPermissions.types.js +21 -0
- package/build/NotificationPermissions.types.js.map +1 -0
- package/build/NotificationPermissionsModule.d.ts +4 -0
- package/build/NotificationPermissionsModule.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.js +67 -0
- package/build/NotificationPermissionsModule.js.map +1 -0
- package/build/NotificationPermissionsModule.kepler.d.ts +3 -0
- package/build/NotificationPermissionsModule.kepler.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.kepler.js +9 -0
- package/build/NotificationPermissionsModule.kepler.js.map +1 -0
- package/build/NotificationPermissionsModule.native.d.ts +4 -0
- package/build/NotificationPermissionsModule.native.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.native.js +3 -0
- package/build/NotificationPermissionsModule.native.js.map +1 -0
- package/build/NotificationPermissionsModule.types.d.ts +7 -0
- package/build/NotificationPermissionsModule.types.d.ts.map +1 -0
- package/build/NotificationPermissionsModule.types.js +2 -0
- package/build/NotificationPermissionsModule.types.js.map +1 -0
- package/build/NotificationPresenterModule.d.ts +4 -0
- package/build/NotificationPresenterModule.d.ts.map +1 -0
- package/build/NotificationPresenterModule.js +5 -0
- package/build/NotificationPresenterModule.js.map +1 -0
- package/build/NotificationPresenterModule.kepler.d.ts +4 -0
- package/build/NotificationPresenterModule.kepler.d.ts.map +1 -0
- package/build/NotificationPresenterModule.kepler.js +55 -0
- package/build/NotificationPresenterModule.kepler.js.map +1 -0
- package/build/NotificationPresenterModule.native.d.ts +4 -0
- package/build/NotificationPresenterModule.native.d.ts.map +1 -0
- package/build/NotificationPresenterModule.native.js +3 -0
- package/build/NotificationPresenterModule.native.js.map +1 -0
- package/build/NotificationPresenterModule.types.d.ts +9 -0
- package/build/NotificationPresenterModule.types.d.ts.map +1 -0
- package/build/NotificationPresenterModule.types.js +2 -0
- package/build/NotificationPresenterModule.types.js.map +1 -0
- package/build/NotificationScheduler.d.ts +4 -0
- package/build/NotificationScheduler.d.ts.map +1 -0
- package/build/NotificationScheduler.js +5 -0
- package/build/NotificationScheduler.js.map +1 -0
- package/build/NotificationScheduler.kepler.d.ts +4 -0
- package/build/NotificationScheduler.kepler.d.ts.map +1 -0
- package/build/NotificationScheduler.kepler.js +50 -0
- package/build/NotificationScheduler.kepler.js.map +1 -0
- package/build/NotificationScheduler.native.d.ts +4 -0
- package/build/NotificationScheduler.native.d.ts.map +1 -0
- package/build/NotificationScheduler.native.js +3 -0
- package/build/NotificationScheduler.native.js.map +1 -0
- package/build/NotificationScheduler.types.d.ts +65 -0
- package/build/NotificationScheduler.types.d.ts.map +1 -0
- package/build/NotificationScheduler.types.js +2 -0
- package/build/NotificationScheduler.types.js.map +1 -0
- package/build/Notifications.types.d.ts +666 -0
- package/build/Notifications.types.d.ts.map +1 -0
- package/build/Notifications.types.js +12 -0
- package/build/Notifications.types.js.map +1 -0
- package/build/NotificationsEmitter.d.ts +75 -0
- package/build/NotificationsEmitter.d.ts.map +1 -0
- package/build/NotificationsEmitter.js +95 -0
- package/build/NotificationsEmitter.js.map +1 -0
- package/build/NotificationsEmitterModule.d.ts +4 -0
- package/build/NotificationsEmitterModule.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.js +12 -0
- package/build/NotificationsEmitterModule.js.map +1 -0
- package/build/NotificationsEmitterModule.kepler.d.ts +3 -0
- package/build/NotificationsEmitterModule.kepler.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.kepler.js +9 -0
- package/build/NotificationsEmitterModule.kepler.js.map +1 -0
- package/build/NotificationsEmitterModule.native.d.ts +4 -0
- package/build/NotificationsEmitterModule.native.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.native.js +3 -0
- package/build/NotificationsEmitterModule.native.js.map +1 -0
- package/build/NotificationsEmitterModule.types.d.ts +6 -0
- package/build/NotificationsEmitterModule.types.d.ts.map +1 -0
- package/build/NotificationsEmitterModule.types.js +2 -0
- package/build/NotificationsEmitterModule.types.js.map +1 -0
- package/build/NotificationsHandler.d.ts +60 -0
- package/build/NotificationsHandler.d.ts.map +1 -0
- package/build/NotificationsHandler.js +72 -0
- package/build/NotificationsHandler.js.map +1 -0
- package/build/NotificationsHandlerModule.d.ts +4 -0
- package/build/NotificationsHandlerModule.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.js +12 -0
- package/build/NotificationsHandlerModule.js.map +1 -0
- package/build/NotificationsHandlerModule.kepler.d.ts +3 -0
- package/build/NotificationsHandlerModule.kepler.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.kepler.js +9 -0
- package/build/NotificationsHandlerModule.kepler.js.map +1 -0
- package/build/NotificationsHandlerModule.native.d.ts +4 -0
- package/build/NotificationsHandlerModule.native.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.native.js +3 -0
- package/build/NotificationsHandlerModule.native.js.map +1 -0
- package/build/NotificationsHandlerModule.types.d.ts +6 -0
- package/build/NotificationsHandlerModule.types.d.ts.map +1 -0
- package/build/NotificationsHandlerModule.types.js +2 -0
- package/build/NotificationsHandlerModule.types.js.map +1 -0
- package/build/PushTokenManager.d.ts +4 -0
- package/build/PushTokenManager.d.ts.map +1 -0
- package/build/PushTokenManager.js +12 -0
- package/build/PushTokenManager.js.map +1 -0
- package/build/PushTokenManager.kepler.d.ts +3 -0
- package/build/PushTokenManager.kepler.d.ts.map +1 -0
- package/build/PushTokenManager.kepler.js +9 -0
- package/build/PushTokenManager.kepler.js.map +1 -0
- package/build/PushTokenManager.native.d.ts +4 -0
- package/build/PushTokenManager.native.d.ts.map +1 -0
- package/build/PushTokenManager.native.js +3 -0
- package/build/PushTokenManager.native.js.map +1 -0
- package/build/PushTokenManager.types.d.ts +6 -0
- package/build/PushTokenManager.types.d.ts.map +1 -0
- package/build/PushTokenManager.types.js +2 -0
- package/build/PushTokenManager.types.js.map +1 -0
- package/build/ServerRegistrationModule.d.ts +4 -0
- package/build/ServerRegistrationModule.d.ts.map +1 -0
- package/build/ServerRegistrationModule.js +5 -0
- package/build/ServerRegistrationModule.js.map +1 -0
- package/build/ServerRegistrationModule.kepler.d.ts +3 -0
- package/build/ServerRegistrationModule.kepler.d.ts.map +1 -0
- package/build/ServerRegistrationModule.kepler.js +9 -0
- package/build/ServerRegistrationModule.kepler.js.map +1 -0
- package/build/ServerRegistrationModule.native.d.ts +4 -0
- package/build/ServerRegistrationModule.native.d.ts.map +1 -0
- package/build/ServerRegistrationModule.native.js +3 -0
- package/build/ServerRegistrationModule.native.js.map +1 -0
- package/build/ServerRegistrationModule.types.d.ts +7 -0
- package/build/ServerRegistrationModule.types.d.ts.map +1 -0
- package/build/ServerRegistrationModule.types.js +2 -0
- package/build/ServerRegistrationModule.types.js.map +1 -0
- package/build/ServerRegistrationModule.web.d.ts +4 -0
- package/build/ServerRegistrationModule.web.d.ts.map +1 -0
- package/build/ServerRegistrationModule.web.js +50 -0
- package/build/ServerRegistrationModule.web.js.map +1 -0
- package/build/TokenEmitter.d.ts +42 -0
- package/build/TokenEmitter.d.ts.map +1 -0
- package/build/TokenEmitter.js +44 -0
- package/build/TokenEmitter.js.map +1 -0
- package/build/Tokens.types.d.ts +99 -0
- package/build/Tokens.types.d.ts.map +1 -0
- package/build/Tokens.types.js +2 -0
- package/build/Tokens.types.js.map +1 -0
- package/build/cancelAllScheduledNotificationsAsync.d.ts +7 -0
- package/build/cancelAllScheduledNotificationsAsync.d.ts.map +1 -0
- package/build/cancelAllScheduledNotificationsAsync.js +14 -0
- package/build/cancelAllScheduledNotificationsAsync.js.map +1 -0
- package/build/cancelScheduledNotificationAsync.d.ts +22 -0
- package/build/cancelScheduledNotificationAsync.d.ts.map +1 -0
- package/build/cancelScheduledNotificationAsync.js +29 -0
- package/build/cancelScheduledNotificationAsync.js.map +1 -0
- package/build/deleteNotificationCategoryAsync.d.ts +11 -0
- package/build/deleteNotificationCategoryAsync.d.ts.map +1 -0
- package/build/deleteNotificationCategoryAsync.js +19 -0
- package/build/deleteNotificationCategoryAsync.js.map +1 -0
- package/build/deleteNotificationChannelAsync.android.d.ts +2 -0
- package/build/deleteNotificationChannelAsync.android.d.ts.map +1 -0
- package/build/deleteNotificationChannelAsync.android.js +9 -0
- package/build/deleteNotificationChannelAsync.android.js.map +1 -0
- package/build/deleteNotificationChannelAsync.d.ts +9 -0
- package/build/deleteNotificationChannelAsync.d.ts.map +1 -0
- package/build/deleteNotificationChannelAsync.js +11 -0
- package/build/deleteNotificationChannelAsync.js.map +1 -0
- package/build/deleteNotificationChannelGroupAsync.android.d.ts +2 -0
- package/build/deleteNotificationChannelGroupAsync.android.d.ts.map +1 -0
- package/build/deleteNotificationChannelGroupAsync.android.js +9 -0
- package/build/deleteNotificationChannelGroupAsync.android.js.map +1 -0
- package/build/deleteNotificationChannelGroupAsync.d.ts +9 -0
- package/build/deleteNotificationChannelGroupAsync.d.ts.map +1 -0
- package/build/deleteNotificationChannelGroupAsync.js +11 -0
- package/build/deleteNotificationChannelGroupAsync.js.map +1 -0
- package/build/dismissAllNotificationsAsync.d.ts +7 -0
- package/build/dismissAllNotificationsAsync.d.ts.map +1 -0
- package/build/dismissAllNotificationsAsync.js +14 -0
- package/build/dismissAllNotificationsAsync.js.map +1 -0
- package/build/dismissNotificationAsync.d.ts +8 -0
- package/build/dismissNotificationAsync.d.ts.map +1 -0
- package/build/dismissNotificationAsync.js +15 -0
- package/build/dismissNotificationAsync.js.map +1 -0
- package/build/getAllScheduledNotificationsAsync.d.ts +8 -0
- package/build/getAllScheduledNotificationsAsync.d.ts.map +1 -0
- package/build/getAllScheduledNotificationsAsync.js +14 -0
- package/build/getAllScheduledNotificationsAsync.js.map +1 -0
- package/build/getBadgeCountAsync.d.ts +8 -0
- package/build/getBadgeCountAsync.d.ts.map +1 -0
- package/build/getBadgeCountAsync.js +15 -0
- package/build/getBadgeCountAsync.js.map +1 -0
- package/build/getDevicePushTokenAsync.d.ts +8 -0
- package/build/getDevicePushTokenAsync.d.ts.map +1 -0
- package/build/getDevicePushTokenAsync.js +27 -0
- package/build/getDevicePushTokenAsync.js.map +1 -0
- package/build/getDevicePushTokenAsync.web.d.ts +3 -0
- package/build/getDevicePushTokenAsync.web.d.ts.map +1 -0
- package/build/getDevicePushTokenAsync.web.js +84 -0
- package/build/getDevicePushTokenAsync.web.js.map +1 -0
- package/build/getExpoPushTokenAsync.d.ts +40 -0
- package/build/getExpoPushTokenAsync.d.ts.map +1 -0
- package/build/getExpoPushTokenAsync.js +177 -0
- package/build/getExpoPushTokenAsync.js.map +1 -0
- package/build/getNextTriggerDateAsync.d.ts +26 -0
- package/build/getNextTriggerDateAsync.d.ts.map +1 -0
- package/build/getNextTriggerDateAsync.js +33 -0
- package/build/getNextTriggerDateAsync.js.map +1 -0
- package/build/getNotificationCategoriesAsync.d.ts +11 -0
- package/build/getNotificationCategoriesAsync.d.ts.map +1 -0
- package/build/getNotificationCategoriesAsync.js +18 -0
- package/build/getNotificationCategoriesAsync.js.map +1 -0
- package/build/getNotificationChannelAsync.android.d.ts +3 -0
- package/build/getNotificationChannelAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelAsync.android.js +9 -0
- package/build/getNotificationChannelAsync.android.js.map +1 -0
- package/build/getNotificationChannelAsync.d.ts +11 -0
- package/build/getNotificationChannelAsync.d.ts.map +1 -0
- package/build/getNotificationChannelAsync.js +13 -0
- package/build/getNotificationChannelAsync.js.map +1 -0
- package/build/getNotificationChannelGroupAsync.android.d.ts +3 -0
- package/build/getNotificationChannelGroupAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelGroupAsync.android.js +9 -0
- package/build/getNotificationChannelGroupAsync.android.js.map +1 -0
- package/build/getNotificationChannelGroupAsync.d.ts +12 -0
- package/build/getNotificationChannelGroupAsync.d.ts.map +1 -0
- package/build/getNotificationChannelGroupAsync.js +14 -0
- package/build/getNotificationChannelGroupAsync.js.map +1 -0
- package/build/getNotificationChannelGroupsAsync.android.d.ts +3 -0
- package/build/getNotificationChannelGroupsAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelGroupsAsync.android.js +9 -0
- package/build/getNotificationChannelGroupsAsync.android.js.map +1 -0
- package/build/getNotificationChannelGroupsAsync.d.ts +10 -0
- package/build/getNotificationChannelGroupsAsync.d.ts.map +1 -0
- package/build/getNotificationChannelGroupsAsync.js +12 -0
- package/build/getNotificationChannelGroupsAsync.js.map +1 -0
- package/build/getNotificationChannelsAsync.android.d.ts +3 -0
- package/build/getNotificationChannelsAsync.android.d.ts.map +1 -0
- package/build/getNotificationChannelsAsync.android.js +9 -0
- package/build/getNotificationChannelsAsync.android.js.map +1 -0
- package/build/getNotificationChannelsAsync.d.ts +10 -0
- package/build/getNotificationChannelsAsync.d.ts.map +1 -0
- package/build/getNotificationChannelsAsync.js +12 -0
- package/build/getNotificationChannelsAsync.js.map +1 -0
- package/build/getPresentedNotificationsAsync.d.ts +9 -0
- package/build/getPresentedNotificationsAsync.d.ts.map +1 -0
- package/build/getPresentedNotificationsAsync.js +15 -0
- package/build/getPresentedNotificationsAsync.js.map +1 -0
- package/build/index.d.ts +39 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +39 -0
- package/build/index.js.map +1 -0
- package/build/kepler/NotificationContent.d.ts +43 -0
- package/build/kepler/NotificationContent.d.ts.map +1 -0
- package/build/kepler/NotificationContent.js +96 -0
- package/build/kepler/NotificationContent.js.map +1 -0
- package/build/kepler/index.d.ts +3 -0
- package/build/kepler/index.d.ts.map +1 -0
- package/build/kepler/index.js +15 -0
- package/build/kepler/index.js.map +1 -0
- package/build/kepler/native-notification-manager.d.ts +3 -0
- package/build/kepler/native-notification-manager.d.ts.map +1 -0
- package/build/kepler/native-notification-manager.js +10 -0
- package/build/kepler/native-notification-manager.js.map +1 -0
- package/build/kepler/types/NotificationManagerTypes.d.ts +373 -0
- package/build/kepler/types/NotificationManagerTypes.d.ts.map +1 -0
- package/build/kepler/types/NotificationManagerTypes.js +279 -0
- package/build/kepler/types/NotificationManagerTypes.js.map +1 -0
- package/build/kepler/types/index.d.ts +3 -0
- package/build/kepler/types/index.d.ts.map +1 -0
- package/build/kepler/types/index.js +15 -0
- package/build/kepler/types/index.js.map +1 -0
- package/build/presentNotificationAsync.d.ts +11 -0
- package/build/presentNotificationAsync.d.ts.map +1 -0
- package/build/presentNotificationAsync.js +22 -0
- package/build/presentNotificationAsync.js.map +1 -0
- package/build/registerTaskAsync.d.ts +29 -0
- package/build/registerTaskAsync.d.ts.map +1 -0
- package/build/registerTaskAsync.js +37 -0
- package/build/registerTaskAsync.js.map +1 -0
- package/build/scheduleNotificationAsync.d.ts +60 -0
- package/build/scheduleNotificationAsync.d.ts.map +1 -0
- package/build/scheduleNotificationAsync.js +261 -0
- package/build/scheduleNotificationAsync.js.map +1 -0
- package/build/setBadgeCountAsync.d.ts +19 -0
- package/build/setBadgeCountAsync.d.ts.map +1 -0
- package/build/setBadgeCountAsync.js +19 -0
- package/build/setBadgeCountAsync.js.map +1 -0
- package/build/setNotificationCategoryAsync.d.ts +15 -0
- package/build/setNotificationCategoryAsync.d.ts.map +1 -0
- package/build/setNotificationCategoryAsync.js +22 -0
- package/build/setNotificationCategoryAsync.js.map +1 -0
- package/build/setNotificationChannelAsync.android.d.ts +3 -0
- package/build/setNotificationChannelAsync.android.d.ts.map +1 -0
- package/build/setNotificationChannelAsync.android.js +9 -0
- package/build/setNotificationChannelAsync.android.js.map +1 -0
- package/build/setNotificationChannelAsync.d.ts +22 -0
- package/build/setNotificationChannelAsync.d.ts.map +1 -0
- package/build/setNotificationChannelAsync.js +24 -0
- package/build/setNotificationChannelAsync.js.map +1 -0
- package/build/setNotificationChannelGroupAsync.android.d.ts +3 -0
- package/build/setNotificationChannelGroupAsync.android.d.ts.map +1 -0
- package/build/setNotificationChannelGroupAsync.android.js +9 -0
- package/build/setNotificationChannelGroupAsync.android.js.map +1 -0
- package/build/setNotificationChannelGroupAsync.d.ts +12 -0
- package/build/setNotificationChannelGroupAsync.d.ts.map +1 -0
- package/build/setNotificationChannelGroupAsync.js +14 -0
- package/build/setNotificationChannelGroupAsync.js.map +1 -0
- package/build/unregisterForNotificationsAsync.d.ts +2 -0
- package/build/unregisterForNotificationsAsync.d.ts.map +1 -0
- package/build/unregisterForNotificationsAsync.js +10 -0
- package/build/unregisterForNotificationsAsync.js.map +1 -0
- package/build/unregisterTaskAsync.d.ts +7 -0
- package/build/unregisterTaskAsync.d.ts.map +1 -0
- package/build/unregisterTaskAsync.js +15 -0
- package/build/unregisterTaskAsync.js.map +1 -0
- package/build/useLastNotificationResponse.d.ts +38 -0
- package/build/useLastNotificationResponse.d.ts.map +1 -0
- package/build/useLastNotificationResponse.js +63 -0
- package/build/useLastNotificationResponse.js.map +1 -0
- package/build/utils/keplerUuidUtils.d.ts +5 -0
- package/build/utils/keplerUuidUtils.d.ts.map +1 -0
- package/build/utils/keplerUuidUtils.js +15 -0
- package/build/utils/keplerUuidUtils.js.map +1 -0
- package/build/utils/updateDevicePushTokenAsync.d.ts +3 -0
- package/build/utils/updateDevicePushTokenAsync.d.ts.map +1 -0
- package/build/utils/updateDevicePushTokenAsync.js +115 -0
- package/build/utils/updateDevicePushTokenAsync.js.map +1 -0
- package/expo-module.config.json +20 -0
- package/ios/EXNotifications/Building/EXNotificationBuilder.h +19 -0
- package/ios/EXNotifications/Building/EXNotificationBuilder.m +91 -0
- package/ios/EXNotifications/EXBadgeModule.h +11 -0
- package/ios/EXNotifications/EXBadgeModule.m +36 -0
- package/ios/EXNotifications/EXServerRegistrationModule.h +19 -0
- package/ios/EXNotifications/EXServerRegistrationModule.m +194 -0
- package/ios/EXNotifications/Notifications/Background/EXBackgroundNotificationTasksModule.h +16 -0
- package/ios/EXNotifications/Notifications/Background/EXBackgroundNotificationTasksModule.m +62 -0
- package/ios/EXNotifications/Notifications/Background/EXBackgroundRemoteNotificationConsumer.h +14 -0
- package/ios/EXNotifications/Notifications/Background/EXBackgroundRemoteNotificationConsumer.m +51 -0
- package/ios/EXNotifications/Notifications/Categories/EXNotificationCategoriesModule.h +25 -0
- package/ios/EXNotifications/Notifications/Categories/EXNotificationCategoriesModule.m +217 -0
- package/ios/EXNotifications/Notifications/EXNotificationCenterDelegate.h +29 -0
- package/ios/EXNotifications/Notifications/EXNotificationCenterDelegate.m +209 -0
- package/ios/EXNotifications/Notifications/EXNotificationSerializer.h +16 -0
- package/ios/EXNotifications/Notifications/EXNotificationSerializer.m +232 -0
- package/ios/EXNotifications/Notifications/EXNotificationsDelegate.h +27 -0
- package/ios/EXNotifications/Notifications/Emitter/EXNotificationsEmitter.h +17 -0
- package/ios/EXNotifications/Notifications/Emitter/EXNotificationsEmitter.m +114 -0
- package/ios/EXNotifications/Notifications/Handler/EXNotificationsHandlerModule.h +12 -0
- package/ios/EXNotifications/Notifications/Handler/EXNotificationsHandlerModule.m +109 -0
- package/ios/EXNotifications/Notifications/Handler/EXSingleNotificationHandlerTask.h +33 -0
- package/ios/EXNotifications/Notifications/Handler/EXSingleNotificationHandlerTask.m +124 -0
- package/ios/EXNotifications/Notifications/NSDictionary+EXNotificationsVerifyingClass.h +7 -0
- package/ios/EXNotifications/Notifications/NSDictionary+EXNotificationsVerifyingClass.m +19 -0
- package/ios/EXNotifications/Notifications/Presenting/EXNotificationPresentationModule.h +13 -0
- package/ios/EXNotifications/Notifications/Presenting/EXNotificationPresentationModule.m +124 -0
- package/ios/EXNotifications/Notifications/Scheduling/EXNotificationSchedulerModule.h +21 -0
- package/ios/EXNotifications/Notifications/Scheduling/EXNotificationSchedulerModule.m +263 -0
- package/ios/EXNotifications/Permissions/EXLegacyRemoteNotificationPermissionRequester.h +13 -0
- package/ios/EXNotifications/Permissions/EXLegacyRemoteNotificationPermissionRequester.m +135 -0
- package/ios/EXNotifications/Permissions/EXNotificationPermissionsModule.h +8 -0
- package/ios/EXNotifications/Permissions/EXNotificationPermissionsModule.m +67 -0
- package/ios/EXNotifications/Permissions/EXRemoteNotificationPermissionSingletonModule.h +29 -0
- package/ios/EXNotifications/Permissions/EXRemoteNotificationPermissionSingletonModule.m +68 -0
- package/ios/EXNotifications/Permissions/EXUserFacingNotificationsPermissionsRequester.h +15 -0
- package/ios/EXNotifications/Permissions/EXUserFacingNotificationsPermissionsRequester.m +202 -0
- package/ios/EXNotifications/PushToken/EXPushTokenListener.h +14 -0
- package/ios/EXNotifications/PushToken/EXPushTokenManager.h +24 -0
- package/ios/EXNotifications/PushToken/EXPushTokenManager.m +63 -0
- package/ios/EXNotifications/PushToken/EXPushTokenModule.h +9 -0
- package/ios/EXNotifications/PushToken/EXPushTokenModule.m +154 -0
- package/ios/EXNotifications.podspec +25 -0
- package/package.json +67 -0
- package/plugin/build/withNotifications.d.ts +28 -0
- package/plugin/build/withNotifications.js +12 -0
- package/plugin/build/withNotificationsAndroid.d.ts +42 -0
- package/plugin/build/withNotificationsAndroid.js +184 -0
- package/plugin/build/withNotificationsIOS.d.ts +14 -0
- package/plugin/build/withNotificationsIOS.js +58 -0
- package/plugin/jest.config.js +1 -0
- package/plugin/src/withNotifications.ts +40 -0
- package/plugin/src/withNotificationsAndroid.ts +239 -0
- package/plugin/src/withNotificationsIOS.ts +78 -0
- package/plugin/tsconfig.json +9 -0
- package/src/BackgroundNotificationTasksModule.kepler.ts +8 -0
- package/src/BackgroundNotificationTasksModule.native.ts +7 -0
- package/src/BackgroundNotificationTasksModule.ts +8 -0
- package/src/BackgroundNotificationTasksModule.types.ts +12 -0
- package/src/BackgroundNotificationTasksModule.web.ts +8 -0
- package/src/BadgeModule.kepler.ts +8 -0
- package/src/BadgeModule.native.ts +15 -0
- package/src/BadgeModule.ts +6 -0
- package/src/BadgeModule.types.ts +11 -0
- package/src/BadgeModule.web.ts +28 -0
- package/src/DevicePushTokenAutoRegistration.fx.ts +119 -0
- package/src/NotificationCategoriesModule.kepler.ts +10 -0
- package/src/NotificationCategoriesModule.native.ts +7 -0
- package/src/NotificationCategoriesModule.ts +15 -0
- package/src/NotificationCategoriesModule.types.ts +22 -0
- package/src/NotificationCategoriesModule.web.ts +17 -0
- package/src/NotificationChannelGroupManager.kepler.ts +8 -0
- package/src/NotificationChannelGroupManager.native.ts +7 -0
- package/src/NotificationChannelGroupManager.ts +6 -0
- package/src/NotificationChannelGroupManager.types.ts +34 -0
- package/src/NotificationChannelManager.kepler.ts +8 -0
- package/src/NotificationChannelManager.native.ts +5 -0
- package/src/NotificationChannelManager.ts +6 -0
- package/src/NotificationChannelManager.types.ts +115 -0
- package/src/NotificationPermissions.ts +91 -0
- package/src/NotificationPermissions.types.ts +102 -0
- package/src/NotificationPermissionsModule.kepler.ts +8 -0
- package/src/NotificationPermissionsModule.native.ts +7 -0
- package/src/NotificationPermissionsModule.ts +83 -0
- package/src/NotificationPermissionsModule.types.ts +13 -0
- package/src/NotificationPresenterModule.kepler.ts +67 -0
- package/src/NotificationPresenterModule.native.ts +5 -0
- package/src/NotificationPresenterModule.ts +6 -0
- package/src/NotificationPresenterModule.types.ts +13 -0
- package/src/NotificationScheduler.kepler.ts +63 -0
- package/src/NotificationScheduler.native.ts +5 -0
- package/src/NotificationScheduler.ts +6 -0
- package/src/NotificationScheduler.types.ts +89 -0
- package/src/Notifications.types.ts +722 -0
- package/src/NotificationsEmitter.ts +111 -0
- package/src/NotificationsEmitterModule.kepler.ts +8 -0
- package/src/NotificationsEmitterModule.native.ts +5 -0
- package/src/NotificationsEmitterModule.ts +17 -0
- package/src/NotificationsEmitterModule.types.ts +7 -0
- package/src/NotificationsHandler.ts +120 -0
- package/src/NotificationsHandlerModule.kepler.ts +8 -0
- package/src/NotificationsHandlerModule.native.ts +5 -0
- package/src/NotificationsHandlerModule.ts +17 -0
- package/src/NotificationsHandlerModule.types.ts +10 -0
- package/src/PushTokenManager.kepler.ts +8 -0
- package/src/PushTokenManager.native.ts +5 -0
- package/src/PushTokenManager.ts +17 -0
- package/src/PushTokenManager.types.ts +6 -0
- package/src/ServerRegistrationModule.kepler.ts +8 -0
- package/src/ServerRegistrationModule.native.ts +7 -0
- package/src/ServerRegistrationModule.ts +6 -0
- package/src/ServerRegistrationModule.types.ts +7 -0
- package/src/ServerRegistrationModule.web.ts +56 -0
- package/src/TokenEmitter.ts +56 -0
- package/src/Tokens.types.ts +110 -0
- package/src/cancelAllScheduledNotificationsAsync.ts +16 -0
- package/src/cancelScheduledNotificationAsync.ts +31 -0
- package/src/deleteNotificationCategoryAsync.ts +23 -0
- package/src/deleteNotificationChannelAsync.android.ts +11 -0
- package/src/deleteNotificationChannelAsync.ts +10 -0
- package/src/deleteNotificationChannelGroupAsync.android.ts +11 -0
- package/src/deleteNotificationChannelGroupAsync.ts +10 -0
- package/src/dismissAllNotificationsAsync.ts +16 -0
- package/src/dismissNotificationAsync.ts +19 -0
- package/src/getAllScheduledNotificationsAsync.ts +17 -0
- package/src/getBadgeCountAsync.ts +17 -0
- package/src/getDevicePushTokenAsync.ts +31 -0
- package/src/getDevicePushTokenAsync.web.ts +122 -0
- package/src/getExpoPushTokenAsync.ts +238 -0
- package/src/getNextTriggerDateAsync.ts +38 -0
- package/src/getNotificationCategoriesAsync.ts +21 -0
- package/src/getNotificationChannelAsync.android.ts +13 -0
- package/src/getNotificationChannelAsync.ts +16 -0
- package/src/getNotificationChannelGroupAsync.android.ts +14 -0
- package/src/getNotificationChannelGroupAsync.ts +17 -0
- package/src/getNotificationChannelGroupsAsync.android.ts +13 -0
- package/src/getNotificationChannelGroupsAsync.ts +15 -0
- package/src/getNotificationChannelsAsync.android.ts +11 -0
- package/src/getNotificationChannelsAsync.ts +13 -0
- package/src/getPresentedNotificationsAsync.ts +18 -0
- package/src/index.ts +38 -0
- package/src/kepler/NotificationContent.ts +119 -0
- package/src/kepler/index.ts +16 -0
- package/src/kepler/native-notification-manager.ts +10 -0
- package/src/kepler/types/NotificationManagerTypes.ts +508 -0
- package/src/kepler/types/index.ts +16 -0
- package/src/presentNotificationAsync.ts +32 -0
- package/src/registerTaskAsync.ts +39 -0
- package/src/scheduleNotificationAsync.ts +335 -0
- package/src/setBadgeCountAsync.ts +32 -0
- package/src/setNotificationCategoryAsync.ts +37 -0
- package/src/setNotificationChannelAsync.android.ts +15 -0
- package/src/setNotificationChannelAsync.ts +28 -0
- package/src/setNotificationChannelGroupAsync.android.ts +18 -0
- package/src/setNotificationChannelGroupAsync.ts +21 -0
- package/src/unregisterForNotificationsAsync.ts +11 -0
- package/src/unregisterTaskAsync.ts +17 -0
- package/src/useLastNotificationResponse.ts +70 -0
- package/src/utils/keplerUuidUtils.ts +29 -0
- package/src/utils/updateDevicePushTokenAsync.ts +147 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAoVA;;GAEG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC","sourcesContent":["import type {\n PermissionExpiration,\n PermissionResponse,\n PermissionStatus,\n Subscription,\n} from 'expo-modules-core';\n\nimport { CalendarTriggerInput as NativeCalendarTriggerInput } from './NotificationScheduler.types';\nimport { Channel, Extra, Progress } from './kepler';\n\n/**\n * An object represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html)\n * On web there is no extra data.\n */\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record<string, unknown>;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\ninterface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * A Boolean indicating that notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * A Boolean indicating that notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: { [key: string]: string };\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | CalendarNotificationTrigger\n | LocationNotificationTrigger\n | TimeIntervalNotificationTrigger\n | DailyNotificationTrigger\n | WeeklyNotificationTrigger\n | YearlyNotificationTrigger\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n/**\n * A trigger that will cause the notification to be delivered once or many times when the date components match the specified values.\n * Corresponds to native [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = NativeCalendarTriggerInput['value'] & {\n channelId?: string;\n repeats?: boolean;\n};\n\n/**\n * A trigger that will cause the notification to be delivered once or many times (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater. Otherwise, the notification won't be triggered.\n */\nexport interface TimeIntervalTriggerInput {\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once per day.\n */\nexport interface DailyTriggerInput {\n channelId?: string;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once every week.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport interface WeeklyTriggerInput {\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once every year.\n * > **Note:** all properties are specified in JavaScript Date's ranges.\n */\nexport interface YearlyTriggerInput {\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once at the specified `Date`.\n * If you pass in a `number` it will be interpreted as a Unix timestamp.\n */\nexport type DateTriggerInput = Date | number | { channelId?: string; date: Date | number };\n\n/**\n * A type represents time-based, schedulable triggers. For these triggers you can check the next trigger date\n * with [`getNextTriggerDateAsync`](#notificationsgetnexttriggerdateasynctrigger).\n */\nexport type SchedulableNotificationTriggerInput =\n | DateTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | YearlyTriggerInput\n | CalendarTriggerInput;\n\n/**\n * A type represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object represents notification's content.\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data: Record<string, any>;\n sound: 'default' | 'defaultCritical' | 'custom' | null;\n} & (NotificationContentIos | NotificationContentAndroid | NotificationContentKepler);\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * See Kepler documentation\n */\nexport type NotificationContentKepler = {\n /**\n * The icon uri of the notification\n */\n iconUri: string;\n /**\n * The small icon uri of the notification\n */\n smallIconUri?: string;\n /**\n * The large icon uri of the notification\n */\n largeIconUri?: string;\n /**\n * Gets the channel of the notification\n * Describes which channel the notification is grouped in.\n */\n channel: Channel;\n /**\n * Gets the progress of the notification\n * Used if the notification has progress to\n * inform the user about.\n */\n progress?: Progress;\n /**\n * Gets a list of extra properties that are hints\n * that the renderer may use to render the notification.\n * There is no guarantee that these extras will be used\n * by the renderer.\n */\n extras?: Extra[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object represents notification content that you pass in to `presentNotificationAsync` or as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record<string, any>;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n sound?: boolean | string;\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * the setting used when the value is not provided or is invalid is `true` (the notification\n * will be dismissed automatically). Corresponds directly to Android's `setAutoCancel`\n * behavior. In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n} & Partial<NotificationContentKepler>;\n\n/**\n * An object represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object represents behavior that should be applied to the incoming notification.\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n shouldShowAlert: boolean;\n shouldPlaySound: boolean;\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n// @docsMissing\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * A boolean indicating whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * A boolean indicating whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * A boolean indicating whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * A boolean indicating whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * A boolean indicating whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\nexport type { Subscription, PermissionResponse, PermissionStatus, PermissionExpiration };\n"]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Subscription } from 'expo-modules-core';
|
|
2
|
+
import { Notification, NotificationResponse } from './Notifications.types';
|
|
3
|
+
export declare const DEFAULT_ACTION_IDENTIFIER = "expo.modules.notifications.actions.DEFAULT";
|
|
4
|
+
/**
|
|
5
|
+
* Listeners registered by this method will be called whenever a notification is received while the app is running.
|
|
6
|
+
* @param listener A function accepting a notification ([`Notification`](#notification)) as an argument.
|
|
7
|
+
* @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.
|
|
8
|
+
* @example Registering a notification listener using a React hook:
|
|
9
|
+
* ```jsx
|
|
10
|
+
* import React from 'react';
|
|
11
|
+
* import * as Notifications from '@amazon-devices/expo-notifications';
|
|
12
|
+
*
|
|
13
|
+
* export default function App() {
|
|
14
|
+
* React.useEffect(() => {
|
|
15
|
+
* const subscription = Notifications.addNotificationReceivedListener(notification => {
|
|
16
|
+
* console.log(notification);
|
|
17
|
+
* });
|
|
18
|
+
* return () => subscription.remove();
|
|
19
|
+
* }, []);
|
|
20
|
+
*
|
|
21
|
+
* return (
|
|
22
|
+
* // Your app content
|
|
23
|
+
* );
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
* @header listen
|
|
27
|
+
*/
|
|
28
|
+
export declare function addNotificationReceivedListener(listener: (event: Notification) => void): Subscription;
|
|
29
|
+
/**
|
|
30
|
+
* Listeners registered by this method will be called whenever some notifications have been dropped by the server.
|
|
31
|
+
* Applicable only to Firebase Cloud Messaging which we use as a notifications service on Android. It corresponds to `onDeletedMessages()` callback.
|
|
32
|
+
* More information can be found in [Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).
|
|
33
|
+
* @param listener A callback function.
|
|
34
|
+
* @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.
|
|
35
|
+
* @header listen
|
|
36
|
+
*/
|
|
37
|
+
export declare function addNotificationsDroppedListener(listener: () => void): Subscription;
|
|
38
|
+
/**
|
|
39
|
+
* Listeners registered by this method will be called whenever a user interacts with a notification (for example, taps on it).
|
|
40
|
+
* @param listener A function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.
|
|
41
|
+
* @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.
|
|
42
|
+
* @example Register a notification responder listener:
|
|
43
|
+
* ```jsx
|
|
44
|
+
* import React from 'react';
|
|
45
|
+
* import { Linking } from 'react-native';
|
|
46
|
+
* import * as Notifications from '@amazon-devices/expo-notifications';
|
|
47
|
+
*
|
|
48
|
+
* export default function Container() {
|
|
49
|
+
* React.useEffect(() => {
|
|
50
|
+
* const subscription = Notifications.addNotificationResponseReceivedListener(response => {
|
|
51
|
+
* const url = response.notification.request.content.data.url;
|
|
52
|
+
* Linking.openURL(url);
|
|
53
|
+
* });
|
|
54
|
+
* return () => subscription.remove();
|
|
55
|
+
* }, []);
|
|
56
|
+
*
|
|
57
|
+
* return (
|
|
58
|
+
* // Your app content
|
|
59
|
+
* );
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
* @header listen
|
|
63
|
+
*/
|
|
64
|
+
export declare function addNotificationResponseReceivedListener(listener: (event: NotificationResponse) => void): Subscription;
|
|
65
|
+
/**
|
|
66
|
+
* Removes a notification subscription returned by an `addNotificationListener` call.
|
|
67
|
+
* @param subscription A subscription returned by `addNotificationListener` method.
|
|
68
|
+
* @header listen
|
|
69
|
+
*/
|
|
70
|
+
export declare function removeNotificationSubscription(subscription: Subscription): void;
|
|
71
|
+
/**
|
|
72
|
+
* @header listen
|
|
73
|
+
*/
|
|
74
|
+
export declare function getLastNotificationResponseAsync(): Promise<NotificationResponse | null>;
|
|
75
|
+
//# sourceMappingURL=NotificationsEmitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitter.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAW3E,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GACtC,YAAY,CAEd;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,YAAY,CAElF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAC9C,YAAY,CAKd;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,YAAY,QAExE;AAGD;;GAEG;AACH,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAK7F"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { EventEmitter, UnavailabilityError } from 'expo-modules-core';
|
|
2
|
+
import NotificationsEmitterModule from './NotificationsEmitterModule';
|
|
3
|
+
// Web uses SyntheticEventEmitter
|
|
4
|
+
const emitter = new EventEmitter(NotificationsEmitterModule);
|
|
5
|
+
const didReceiveNotificationEventName = 'onDidReceiveNotification';
|
|
6
|
+
const didDropNotificationsEventName = 'onNotificationsDeleted';
|
|
7
|
+
const didReceiveNotificationResponseEventName = 'onDidReceiveNotificationResponse';
|
|
8
|
+
// @docsMissing
|
|
9
|
+
export const DEFAULT_ACTION_IDENTIFIER = 'expo.modules.notifications.actions.DEFAULT';
|
|
10
|
+
/**
|
|
11
|
+
* Listeners registered by this method will be called whenever a notification is received while the app is running.
|
|
12
|
+
* @param listener A function accepting a notification ([`Notification`](#notification)) as an argument.
|
|
13
|
+
* @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.
|
|
14
|
+
* @example Registering a notification listener using a React hook:
|
|
15
|
+
* ```jsx
|
|
16
|
+
* import React from 'react';
|
|
17
|
+
* import * as Notifications from '@amazon-devices/expo-notifications';
|
|
18
|
+
*
|
|
19
|
+
* export default function App() {
|
|
20
|
+
* React.useEffect(() => {
|
|
21
|
+
* const subscription = Notifications.addNotificationReceivedListener(notification => {
|
|
22
|
+
* console.log(notification);
|
|
23
|
+
* });
|
|
24
|
+
* return () => subscription.remove();
|
|
25
|
+
* }, []);
|
|
26
|
+
*
|
|
27
|
+
* return (
|
|
28
|
+
* // Your app content
|
|
29
|
+
* );
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
* @header listen
|
|
33
|
+
*/
|
|
34
|
+
export function addNotificationReceivedListener(listener) {
|
|
35
|
+
return emitter.addListener(didReceiveNotificationEventName, listener);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Listeners registered by this method will be called whenever some notifications have been dropped by the server.
|
|
39
|
+
* Applicable only to Firebase Cloud Messaging which we use as a notifications service on Android. It corresponds to `onDeletedMessages()` callback.
|
|
40
|
+
* More information can be found in [Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).
|
|
41
|
+
* @param listener A callback function.
|
|
42
|
+
* @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.
|
|
43
|
+
* @header listen
|
|
44
|
+
*/
|
|
45
|
+
export function addNotificationsDroppedListener(listener) {
|
|
46
|
+
return emitter.addListener(didDropNotificationsEventName, listener);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Listeners registered by this method will be called whenever a user interacts with a notification (for example, taps on it).
|
|
50
|
+
* @param listener A function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.
|
|
51
|
+
* @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.
|
|
52
|
+
* @example Register a notification responder listener:
|
|
53
|
+
* ```jsx
|
|
54
|
+
* import React from 'react';
|
|
55
|
+
* import { Linking } from 'react-native';
|
|
56
|
+
* import * as Notifications from '@amazon-devices/expo-notifications';
|
|
57
|
+
*
|
|
58
|
+
* export default function Container() {
|
|
59
|
+
* React.useEffect(() => {
|
|
60
|
+
* const subscription = Notifications.addNotificationResponseReceivedListener(response => {
|
|
61
|
+
* const url = response.notification.request.content.data.url;
|
|
62
|
+
* Linking.openURL(url);
|
|
63
|
+
* });
|
|
64
|
+
* return () => subscription.remove();
|
|
65
|
+
* }, []);
|
|
66
|
+
*
|
|
67
|
+
* return (
|
|
68
|
+
* // Your app content
|
|
69
|
+
* );
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
* @header listen
|
|
73
|
+
*/
|
|
74
|
+
export function addNotificationResponseReceivedListener(listener) {
|
|
75
|
+
return emitter.addListener(didReceiveNotificationResponseEventName, listener);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Removes a notification subscription returned by an `addNotificationListener` call.
|
|
79
|
+
* @param subscription A subscription returned by `addNotificationListener` method.
|
|
80
|
+
* @header listen
|
|
81
|
+
*/
|
|
82
|
+
export function removeNotificationSubscription(subscription) {
|
|
83
|
+
emitter.removeSubscription(subscription);
|
|
84
|
+
}
|
|
85
|
+
// @docsMissing
|
|
86
|
+
/**
|
|
87
|
+
* @header listen
|
|
88
|
+
*/
|
|
89
|
+
export async function getLastNotificationResponseAsync() {
|
|
90
|
+
if (!NotificationsEmitterModule.getLastNotificationResponseAsync) {
|
|
91
|
+
throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponseAsync');
|
|
92
|
+
}
|
|
93
|
+
return await NotificationsEmitterModule.getLastNotificationResponseAsync();
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=NotificationsEmitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitter.js","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGpF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAEtE,iCAAiC;AACjC,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,0BAA0B,CAAC,CAAC;AAE7D,MAAM,+BAA+B,GAAG,0BAA0B,CAAC;AACnE,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAC/D,MAAM,uCAAuC,GAAG,kCAAkC,CAAC;AAEnF,eAAe;AACf,MAAM,CAAC,MAAM,yBAAyB,GAAG,4CAA4C,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAAuC;IAEvC,OAAO,OAAO,CAAC,WAAW,CAAe,+BAA+B,EAAE,QAAQ,CAAC,CAAC;AACtF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,+BAA+B,CAAC,QAAoB;IAClE,OAAO,OAAO,CAAC,WAAW,CAAO,6BAA6B,EAAE,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,uCAAuC,CACrD,QAA+C;IAE/C,OAAO,OAAO,CAAC,WAAW,CACxB,uCAAuC,EACvC,QAAQ,CACT,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAAC,YAA0B;IACvE,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC3C,CAAC;AAED,eAAe;AACf;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC;IACpD,IAAI,CAAC,0BAA0B,CAAC,gCAAgC,EAAE,CAAC;QACjE,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,kCAAkC,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,MAAM,0BAA0B,CAAC,gCAAgC,EAAE,CAAC;AAC7E,CAAC","sourcesContent":["import { EventEmitter, Subscription, UnavailabilityError } from 'expo-modules-core';\n\nimport { Notification, NotificationResponse } from './Notifications.types';\nimport NotificationsEmitterModule from './NotificationsEmitterModule';\n\n// Web uses SyntheticEventEmitter\nconst emitter = new EventEmitter(NotificationsEmitterModule);\n\nconst didReceiveNotificationEventName = 'onDidReceiveNotification';\nconst didDropNotificationsEventName = 'onNotificationsDeleted';\nconst didReceiveNotificationResponseEventName = 'onDidReceiveNotificationResponse';\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 A [`Subscription`](#subscription) 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 '@amazon-devices/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): Subscription {\n return emitter.addListener<Notification>(didReceiveNotificationEventName, listener);\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 A [`Subscription`](#subscription) object represents the subscription of the provided listener.\n * @header listen\n */\nexport function addNotificationsDroppedListener(listener: () => void): Subscription {\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 A [`Subscription`](#subscription) 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 '@amazon-devices/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): Subscription {\n return emitter.addListener<NotificationResponse>(\n didReceiveNotificationResponseEventName,\n listener\n );\n}\n\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: Subscription) {\n emitter.removeSubscription(subscription);\n}\n\n// @docsMissing\n/**\n * @header listen\n */\nexport async function getLastNotificationResponseAsync(): Promise<NotificationResponse | null> {\n if (!NotificationsEmitterModule.getLastNotificationResponseAsync) {\n throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponseAsync');\n }\n return await NotificationsEmitterModule.getLastNotificationResponseAsync();\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitterModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;wBAc3E,0BAA0B;AAV/B,wBAUgC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Platform } from 'expo-modules-core';
|
|
2
|
+
let warningHasBeenShown = false;
|
|
3
|
+
export default {
|
|
4
|
+
addListener: () => {
|
|
5
|
+
if (!warningHasBeenShown) {
|
|
6
|
+
console.warn(`[expo-notifications] Emitting notifications is not yet fully supported on ${Platform.OS}. Adding a listener will have no effect.`);
|
|
7
|
+
warningHasBeenShown = true;
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
removeListeners: () => { },
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=NotificationsEmitterModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.js","sourceRoot":"","sources":["../src/NotificationsEmitterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CACV,6EAA6E,QAAQ,CAAC,EAAE,0CAA0C,CACnI,CAAC;YACF,mBAAmB,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACI,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport { NotificationsEmitterModule } from './NotificationsEmitterModule.types';\n\nlet warningHasBeenShown = false;\n\nexport default {\n addListener: () => {\n if (!warningHasBeenShown) {\n console.warn(\n `[expo-notifications] Emitting notifications is not yet fully supported on ${Platform.OS}. Adding a listener will have no effect.`\n );\n warningHasBeenShown = true;\n }\n },\n removeListeners: () => {},\n} as NotificationsEmitterModule;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.kepler.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitterModule.kepler.ts"],"names":[],"mappings":";AAOA,wBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.kepler.js","sourceRoot":"","sources":["../src/NotificationsEmitterModule.kepler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * PROPRIETARY/CONFIDENTIAL\n *\n * Use is subject to license terms.\n */\nexport default {};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitterModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;;AAEhF,wBAA2F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.native.js","sourceRoot":"","sources":["../src/NotificationsEmitterModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAA6B,0BAA0B,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationsEmitterModule } from './NotificationsEmitterModule.types';\n\nexport default requireNativeModule<NotificationsEmitterModule>('ExpoNotificationsEmitter');\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProxyNativeModule } from 'expo-modules-core';
|
|
2
|
+
import { NotificationResponse } from './Notifications.types';
|
|
3
|
+
export interface NotificationsEmitterModule extends ProxyNativeModule {
|
|
4
|
+
getLastNotificationResponseAsync?: () => Promise<NotificationResponse | null>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=NotificationsEmitterModule.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitterModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,gCAAgC,CAAC,EAAE,MAAM,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;CAC/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.types.js","sourceRoot":"","sources":["../src/NotificationsEmitterModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nimport { NotificationResponse } from './Notifications.types';\n\nexport interface NotificationsEmitterModule extends ProxyNativeModule {\n getLastNotificationResponseAsync?: () => Promise<NotificationResponse | null>;\n}\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CodedError } from 'expo-modules-core';
|
|
2
|
+
import { Notification, NotificationBehavior } from './Notifications.types';
|
|
3
|
+
/**
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export declare class NotificationTimeoutError extends CodedError {
|
|
7
|
+
info: {
|
|
8
|
+
notification: Notification;
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
constructor(notificationId: string, notification: Notification);
|
|
12
|
+
}
|
|
13
|
+
export type NotificationHandlingError = NotificationTimeoutError | Error;
|
|
14
|
+
export interface NotificationHandler {
|
|
15
|
+
/**
|
|
16
|
+
* A function accepting an incoming notification returning a `Promise` resolving to a behavior ([`NotificationBehavior`](#notificationbehavior))
|
|
17
|
+
* applicable to the notification
|
|
18
|
+
* @param notification An object representing the notification.
|
|
19
|
+
*/
|
|
20
|
+
handleNotification: (notification: Notification) => Promise<NotificationBehavior>;
|
|
21
|
+
/**
|
|
22
|
+
* A function called whenever an incoming notification is handled successfully.
|
|
23
|
+
* @param notificationId Identifier of the notification.
|
|
24
|
+
*/
|
|
25
|
+
handleSuccess?: (notificationId: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* A function called whenever handling of an incoming notification fails.
|
|
28
|
+
* @param notificationId Identifier of the notification.
|
|
29
|
+
* @param error An error which occurred in form of `NotificationHandlingError` object.
|
|
30
|
+
*/
|
|
31
|
+
handleError?: (notificationId: string, error: NotificationHandlingError) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* When a notification is received while the app is running, using this function you can set a callback that will decide
|
|
35
|
+
* whether the notification should be shown to the user or not.
|
|
36
|
+
*
|
|
37
|
+
* When a notification is received, `handleNotification` is called with the incoming notification as an argument.
|
|
38
|
+
* The function should respond with a behavior object within 3 seconds, otherwise, the notification will be discarded.
|
|
39
|
+
* If the notification is handled successfully, `handleSuccess` is called with the identifier of the notification,
|
|
40
|
+
* otherwise (or on timeout) `handleError` will be called.
|
|
41
|
+
*
|
|
42
|
+
* The default behavior when the handler is not set or does not respond in time is not to show the notification.
|
|
43
|
+
* @param handler A single parameter which should be either `null` (if you want to clear the handler) or a [`NotificationHandler`](#notificationhandler) object.
|
|
44
|
+
*
|
|
45
|
+
* @example Implementing a notification handler that always shows the notification when it is received.
|
|
46
|
+
* ```jsx
|
|
47
|
+
* import * as Notifications from 'expo-notifications';
|
|
48
|
+
*
|
|
49
|
+
* Notifications.setNotificationHandler({
|
|
50
|
+
* handleNotification: async () => ({
|
|
51
|
+
* shouldShowAlert: true,
|
|
52
|
+
* shouldPlaySound: false,
|
|
53
|
+
* shouldSetBadge: false,
|
|
54
|
+
* }),
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
* @header inForeground
|
|
58
|
+
*/
|
|
59
|
+
export declare function setNotificationHandler(handler: NotificationHandler | null): void;
|
|
60
|
+
//# sourceMappingURL=NotificationsHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandler.d.ts","sourceRoot":"","sources":["../src/NotificationsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAEhG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG3E;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,UAAU;IACtD,IAAI,EAAE;QAAE,YAAY,EAAE,YAAY,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;gBACrC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY;CAI/D;AAGD,MAAM,MAAM,yBAAyB,GAAG,wBAAwB,GAAG,KAAK,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClF;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CAClF;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAsChF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EventEmitter, CodedError, UnavailabilityError } from 'expo-modules-core';
|
|
2
|
+
import NotificationsHandlerModule from './NotificationsHandlerModule';
|
|
3
|
+
/**
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export class NotificationTimeoutError extends CodedError {
|
|
7
|
+
info;
|
|
8
|
+
constructor(notificationId, notification) {
|
|
9
|
+
super('ERR_NOTIFICATION_TIMEOUT', `Notification handling timed out for ID ${notificationId}.`);
|
|
10
|
+
this.info = { id: notificationId, notification };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
// Web uses SyntheticEventEmitter
|
|
14
|
+
const notificationEmitter = new EventEmitter(NotificationsHandlerModule);
|
|
15
|
+
const handleNotificationEventName = 'onHandleNotification';
|
|
16
|
+
const handleNotificationTimeoutEventName = 'onHandleNotificationTimeout';
|
|
17
|
+
let handleSubscription = null;
|
|
18
|
+
let handleTimeoutSubscription = null;
|
|
19
|
+
/**
|
|
20
|
+
* When a notification is received while the app is running, using this function you can set a callback that will decide
|
|
21
|
+
* whether the notification should be shown to the user or not.
|
|
22
|
+
*
|
|
23
|
+
* When a notification is received, `handleNotification` is called with the incoming notification as an argument.
|
|
24
|
+
* The function should respond with a behavior object within 3 seconds, otherwise, the notification will be discarded.
|
|
25
|
+
* If the notification is handled successfully, `handleSuccess` is called with the identifier of the notification,
|
|
26
|
+
* otherwise (or on timeout) `handleError` will be called.
|
|
27
|
+
*
|
|
28
|
+
* The default behavior when the handler is not set or does not respond in time is not to show the notification.
|
|
29
|
+
* @param handler A single parameter which should be either `null` (if you want to clear the handler) or a [`NotificationHandler`](#notificationhandler) object.
|
|
30
|
+
*
|
|
31
|
+
* @example Implementing a notification handler that always shows the notification when it is received.
|
|
32
|
+
* ```jsx
|
|
33
|
+
* import * as Notifications from 'expo-notifications';
|
|
34
|
+
*
|
|
35
|
+
* Notifications.setNotificationHandler({
|
|
36
|
+
* handleNotification: async () => ({
|
|
37
|
+
* shouldShowAlert: true,
|
|
38
|
+
* shouldPlaySound: false,
|
|
39
|
+
* shouldSetBadge: false,
|
|
40
|
+
* }),
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
* @header inForeground
|
|
44
|
+
*/
|
|
45
|
+
export function setNotificationHandler(handler) {
|
|
46
|
+
if (handleSubscription) {
|
|
47
|
+
handleSubscription.remove();
|
|
48
|
+
handleSubscription = null;
|
|
49
|
+
}
|
|
50
|
+
if (handleTimeoutSubscription) {
|
|
51
|
+
handleTimeoutSubscription.remove();
|
|
52
|
+
handleTimeoutSubscription = null;
|
|
53
|
+
}
|
|
54
|
+
if (handler) {
|
|
55
|
+
handleSubscription = notificationEmitter.addListener(handleNotificationEventName, async ({ id, notification }) => {
|
|
56
|
+
if (!NotificationsHandlerModule.handleNotificationAsync) {
|
|
57
|
+
handler.handleError?.(id, new UnavailabilityError('Notifications', 'handleNotificationAsync'));
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const behavior = await handler.handleNotification(notification);
|
|
62
|
+
await NotificationsHandlerModule.handleNotificationAsync(id, behavior);
|
|
63
|
+
handler.handleSuccess?.(id);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
handler.handleError?.(id, error);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
handleTimeoutSubscription = notificationEmitter.addListener(handleNotificationTimeoutEventName, ({ id, notification }) => handler.handleError?.(id, new NotificationTimeoutError(id, notification)));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=NotificationsHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandler.js","sourceRoot":"","sources":["../src/NotificationsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,UAAU,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGhG,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IACtD,IAAI,CAA6C;IACjD,YAAY,cAAsB,EAAE,YAA0B;QAC5D,KAAK,CAAC,0BAA0B,EAAE,0CAA0C,cAAc,GAAG,CAAC,CAAC;QAC/F,IAAI,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;IACnD,CAAC;CACF;AAgCD,iCAAiC;AACjC,MAAM,mBAAmB,GAAG,IAAI,YAAY,CAAC,0BAA0B,CAAC,CAAC;AAEzE,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;AAC3D,MAAM,kCAAkC,GAAG,6BAA6B,CAAC;AAEzE,IAAI,kBAAkB,GAAwB,IAAI,CAAC;AACnD,IAAI,yBAAyB,GAAwB,IAAI,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAmC;IACxE,IAAI,kBAAkB,EAAE,CAAC;QACvB,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAC5B,kBAAkB,GAAG,IAAI,CAAC;IAC5B,CAAC;IACD,IAAI,yBAAyB,EAAE,CAAC;QAC9B,yBAAyB,CAAC,MAAM,EAAE,CAAC;QACnC,yBAAyB,GAAG,IAAI,CAAC;IACnC,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,kBAAkB,GAAG,mBAAmB,CAAC,WAAW,CAClD,2BAA2B,EAC3B,KAAK,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;YAC7B,IAAI,CAAC,0BAA0B,CAAC,uBAAuB,EAAE,CAAC;gBACxD,OAAO,CAAC,WAAW,EAAE,CACnB,EAAE,EACF,IAAI,mBAAmB,CAAC,eAAe,EAAE,yBAAyB,CAAC,CACpE,CAAC;gBACF,OAAO;YACT,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAChE,MAAM,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;gBACvE,OAAO,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CACF,CAAC;QAEF,yBAAyB,GAAG,mBAAmB,CAAC,WAAW,CACzD,kCAAkC,EAClC,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,CACvB,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,IAAI,wBAAwB,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,CAC5E,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { EventEmitter, Subscription, CodedError, UnavailabilityError } from 'expo-modules-core';\n\nimport { Notification, NotificationBehavior } from './Notifications.types';\nimport NotificationsHandlerModule from './NotificationsHandlerModule';\n\n/**\n * @hidden\n */\nexport class NotificationTimeoutError extends CodedError {\n info: { notification: Notification; id: string };\n constructor(notificationId: string, notification: Notification) {\n super('ERR_NOTIFICATION_TIMEOUT', `Notification handling timed out for ID ${notificationId}.`);\n this.info = { id: notificationId, notification };\n }\n}\n\n// @docsMissing\nexport type NotificationHandlingError = NotificationTimeoutError | Error;\n\nexport interface NotificationHandler {\n /**\n * A function accepting an incoming notification returning a `Promise` resolving to a behavior ([`NotificationBehavior`](#notificationbehavior))\n * applicable to the notification\n * @param notification An object representing the notification.\n */\n handleNotification: (notification: Notification) => Promise<NotificationBehavior>;\n /**\n * A function called whenever an incoming notification is handled successfully.\n * @param notificationId Identifier of the notification.\n */\n handleSuccess?: (notificationId: string) => void;\n /**\n * A function called whenever handling of an incoming notification fails.\n * @param notificationId Identifier of the notification.\n * @param error An error which occurred in form of `NotificationHandlingError` object.\n */\n handleError?: (notificationId: string, error: NotificationHandlingError) => void;\n}\n\ntype HandleNotificationEvent = {\n id: string;\n notification: Notification;\n};\n\ntype HandleNotificationTimeoutEvent = HandleNotificationEvent;\n\n// Web uses SyntheticEventEmitter\nconst notificationEmitter = new EventEmitter(NotificationsHandlerModule);\n\nconst handleNotificationEventName = 'onHandleNotification';\nconst handleNotificationTimeoutEventName = 'onHandleNotificationTimeout';\n\nlet handleSubscription: Subscription | null = null;\nlet handleTimeoutSubscription: Subscription | null = null;\n\n/**\n * When a notification is received while the app is running, using this function you can set a callback that will decide\n * whether the notification should be shown to the user or not.\n *\n * When a notification is received, `handleNotification` is called with the incoming notification as an argument.\n * The function should respond with a behavior object within 3 seconds, otherwise, the notification will be discarded.\n * If the notification is handled successfully, `handleSuccess` is called with the identifier of the notification,\n * otherwise (or on timeout) `handleError` will be called.\n *\n * The default behavior when the handler is not set or does not respond in time is not to show the notification.\n * @param handler A single parameter which should be either `null` (if you want to clear the handler) or a [`NotificationHandler`](#notificationhandler) object.\n *\n * @example Implementing a notification handler that always shows the notification when it is received.\n * ```jsx\n * import * as Notifications from 'expo-notifications';\n *\n * Notifications.setNotificationHandler({\n * handleNotification: async () => ({\n * shouldShowAlert: true,\n * shouldPlaySound: false,\n * shouldSetBadge: false,\n * }),\n * });\n * ```\n * @header inForeground\n */\nexport function setNotificationHandler(handler: NotificationHandler | null): void {\n if (handleSubscription) {\n handleSubscription.remove();\n handleSubscription = null;\n }\n if (handleTimeoutSubscription) {\n handleTimeoutSubscription.remove();\n handleTimeoutSubscription = null;\n }\n\n if (handler) {\n handleSubscription = notificationEmitter.addListener<HandleNotificationEvent>(\n handleNotificationEventName,\n async ({ id, notification }) => {\n if (!NotificationsHandlerModule.handleNotificationAsync) {\n handler.handleError?.(\n id,\n new UnavailabilityError('Notifications', 'handleNotificationAsync')\n );\n return;\n }\n\n try {\n const behavior = await handler.handleNotification(notification);\n await NotificationsHandlerModule.handleNotificationAsync(id, behavior);\n handler.handleSuccess?.(id);\n } catch (error) {\n handler.handleError?.(id, error);\n }\n }\n );\n\n handleTimeoutSubscription = notificationEmitter.addListener<HandleNotificationTimeoutEvent>(\n handleNotificationTimeoutEventName,\n ({ id, notification }) =>\n handler.handleError?.(id, new NotificationTimeoutError(id, notification))\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.d.ts","sourceRoot":"","sources":["../src/NotificationsHandlerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;wBAc3E,0BAA0B;AAV/B,wBAUgC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Platform } from 'expo-modules-core';
|
|
2
|
+
let warningHasBeenShown = false;
|
|
3
|
+
export default {
|
|
4
|
+
addListener: () => {
|
|
5
|
+
if (!warningHasBeenShown) {
|
|
6
|
+
console.warn(`[expo-notifications] Notifications handling is not yet fully supported on ${Platform.OS}. Handling notifications will have no effect.`);
|
|
7
|
+
warningHasBeenShown = true;
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
removeListeners: () => { },
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=NotificationsHandlerModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.js","sourceRoot":"","sources":["../src/NotificationsHandlerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CACV,6EAA6E,QAAQ,CAAC,EAAE,+CAA+C,CACxI,CAAC;YACF,mBAAmB,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACI,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport { NotificationsHandlerModule } from './NotificationsHandlerModule.types';\n\nlet warningHasBeenShown = false;\n\nexport default {\n addListener: () => {\n if (!warningHasBeenShown) {\n console.warn(\n `[expo-notifications] Notifications handling is not yet fully supported on ${Platform.OS}. Handling notifications will have no effect.`\n );\n warningHasBeenShown = true;\n }\n },\n removeListeners: () => {},\n} as NotificationsHandlerModule;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.kepler.d.ts","sourceRoot":"","sources":["../src/NotificationsHandlerModule.kepler.ts"],"names":[],"mappings":";AAOA,wBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.kepler.js","sourceRoot":"","sources":["../src/NotificationsHandlerModule.kepler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * PROPRIETARY/CONFIDENTIAL\n *\n * Use is subject to license terms.\n */\nexport default {};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationsHandlerModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;;AAEhF,wBAAiG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.native.js","sourceRoot":"","sources":["../src/NotificationsHandlerModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAA6B,gCAAgC,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationsHandlerModule } from './NotificationsHandlerModule.types';\n\nexport default requireNativeModule<NotificationsHandlerModule>('ExpoNotificationsHandlerModule');\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProxyNativeModule } from 'expo-modules-core';
|
|
2
|
+
import { NotificationBehavior } from './Notifications.types';
|
|
3
|
+
export interface NotificationsHandlerModule extends ProxyNativeModule {
|
|
4
|
+
handleNotificationAsync?: (notificationId: string, notificationBehavior: NotificationBehavior) => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=NotificationsHandlerModule.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationsHandlerModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,uBAAuB,CAAC,EAAE,CACxB,cAAc,EAAE,MAAM,EACtB,oBAAoB,EAAE,oBAAoB,KACvC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.types.js","sourceRoot":"","sources":["../src/NotificationsHandlerModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nimport { NotificationBehavior } from './Notifications.types';\n\nexport interface NotificationsHandlerModule extends ProxyNativeModule {\n handleNotificationAsync?: (\n notificationId: string,\n notificationBehavior: NotificationBehavior\n ) => Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushTokenManager.d.ts","sourceRoot":"","sources":["../src/PushTokenManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;wBAc7D,sBAAsB;AAV3B,wBAU4B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Platform } from 'expo-modules-core';
|
|
2
|
+
let warningHasBeenShown = false;
|
|
3
|
+
export default {
|
|
4
|
+
addListener: () => {
|
|
5
|
+
if (!warningHasBeenShown) {
|
|
6
|
+
console.warn(`[expo-notifications] Listening to push token changes is not yet fully supported on ${Platform.OS}. Adding a listener will have no effect.`);
|
|
7
|
+
warningHasBeenShown = true;
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
removeListeners: () => { },
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=PushTokenManager.js.map
|