├── .buckconfig ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .github └── workflows │ ├── docs_deployment.yml │ ├── flutter_checks.yml │ ├── linting.yml │ ├── pr_title.yml │ ├── publish.yml │ ├── scripts │ ├── install-flutter.sh │ ├── install-tools.sh │ └── validate-formatting.sh │ ├── stale.yml │ ├── tests_e2e_android.yml │ ├── tests_e2e_ios.yml │ ├── tests_jest.yml │ └── tests_junit.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── .releaserc ├── .releaserc.react-native-path-filter.js ├── .watchmanconfig ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── android ├── .editorconfig ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── proguard-rules.pro ├── schemas │ └── app.notifee.core.database.NotifeeCoreDatabase │ │ ├── 1.json │ │ └── 2.json ├── settings.gradle └── src │ ├── androidTest │ └── java │ │ └── app │ │ └── notifee │ │ └── core │ │ ├── ExampleInstrumentedTest.java │ │ └── database │ │ └── NotifeeCoreDatabaseTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── app │ │ │ └── notifee │ │ │ └── core │ │ │ ├── AlarmPermissionBroadcastReceiver.java │ │ │ ├── BlockStateBroadcastReceiver.java │ │ │ ├── ChannelManager.java │ │ │ ├── ContextHolder.java │ │ │ ├── EventBus.java │ │ │ ├── EventSubscriber.java │ │ │ ├── ForegroundService.java │ │ │ ├── InitProvider.java │ │ │ ├── KeepForSdk.java │ │ │ ├── Logger.java │ │ │ ├── Notifee.java │ │ │ ├── NotifeeAlarmManager.java │ │ │ ├── NotificationAlarmReceiver.java │ │ │ ├── NotificationManager.java │ │ │ ├── NotificationPendingIntent.java │ │ │ ├── NotificationReceiverActivity.java │ │ │ ├── NotificationReceiverHandler.java │ │ │ ├── Preferences.java │ │ │ ├── RebootBroadcastReceiver.java │ │ │ ├── ReceiverService.java │ │ │ ├── Worker.java │ │ │ ├── database │ │ │ ├── NotifeeCoreDatabase.java │ │ │ ├── WorkDataDao.java │ │ │ ├── WorkDataEntity.java │ │ │ └── WorkDataRepository.java │ │ │ ├── event │ │ │ ├── BlockStateEvent.java │ │ │ ├── ForegroundServiceEvent.java │ │ │ ├── InitialNotificationEvent.java │ │ │ ├── LogEvent.java │ │ │ ├── MainComponentEvent.java │ │ │ └── NotificationEvent.java │ │ │ ├── interfaces │ │ │ ├── EventListener.java │ │ │ └── MethodCallResult.java │ │ │ ├── model │ │ │ ├── ChannelGroupModel.java │ │ │ ├── ChannelModel.java │ │ │ ├── IntervalTriggerModel.java │ │ │ ├── NotificationAndroidActionModel.java │ │ │ ├── NotificationAndroidModel.java │ │ │ ├── NotificationAndroidPressActionModel.java │ │ │ ├── NotificationAndroidStyleModel.java │ │ │ ├── NotificationModel.java │ │ │ ├── TimestampTriggerModel.java │ │ │ └── package-info.java │ │ │ └── utility │ │ │ ├── AlarmUtils.java │ │ │ ├── Callbackable.java │ │ │ ├── ColorUtils.java │ │ │ ├── ExtendedListenableFuture.java │ │ │ ├── IntentUtils.java │ │ │ ├── ObjectUtils.java │ │ │ ├── PowerManagerUtils.java │ │ │ ├── ResourceUtils.java │ │ │ ├── TextUtils.java │ │ │ └── package-info.java │ └── res │ │ ├── drawable │ │ └── .gitkeep │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── app │ └── notifee │ └── core │ └── model │ └── TimestampTriggerModelTest.java ├── babel.config.js ├── build_ios_core.sh ├── codecov.yml ├── docs.json ├── docs ├── assets │ └── notifee.webp ├── index.mdx └── react-native │ ├── android │ ├── appearance.mdx │ ├── background-restrictions.mdx │ ├── behaviour.mdx │ ├── channels.mdx │ ├── foreground-service.mdx │ ├── grouping-and-sorting.mdx │ ├── interaction.mdx │ ├── introduction.mdx │ ├── permissions.mdx │ ├── progress-indicators.mdx │ ├── styles.mdx │ └── timers.mdx │ ├── debugging.mdx │ ├── displaying-a-notification.mdx │ ├── environment-support.mdx │ ├── events.mdx │ ├── installation.mdx │ ├── integrations │ ├── fcm.mdx │ └── onesignal.mdx │ ├── ios │ ├── appearance.mdx │ ├── badges.mdx │ ├── behaviour.mdx │ ├── categories.mdx │ ├── interaction.mdx │ ├── introduction.mdx │ ├── permissions.mdx │ └── remote-notification-support.mdx │ ├── overview.mdx │ ├── reference │ ├── Enumeration.AlarmType.mdx │ ├── Enumeration.AndroidBadgeIconType.mdx │ ├── Enumeration.AndroidCategory.mdx │ ├── Enumeration.AndroidColor.mdx │ ├── Enumeration.AndroidDefaults.mdx │ ├── Enumeration.AndroidFlags.mdx │ ├── Enumeration.AndroidForegroundServiceType.mdx │ ├── Enumeration.AndroidGroupAlertBehavior.mdx │ ├── Enumeration.AndroidImportance.mdx │ ├── Enumeration.AndroidLaunchActivityFlag.mdx │ ├── Enumeration.AndroidNotificationSetting.mdx │ ├── Enumeration.AndroidStyle.mdx │ ├── Enumeration.AndroidVisibility.mdx │ ├── Enumeration.AuthorizationStatus.mdx │ ├── Enumeration.EventType.mdx │ ├── Enumeration.IOSIntentIdentifier.mdx │ ├── Enumeration.IOSNotificationSetting.mdx │ ├── Enumeration.IOSShowPreviewsSetting.mdx │ ├── Enumeration.RepeatFrequency.mdx │ ├── Enumeration.TimeUnit.mdx │ ├── Enumeration.TriggerType.mdx │ ├── Interface.AndroidAction.mdx │ ├── Interface.AndroidBigPictureStyle.mdx │ ├── Interface.AndroidBigTextStyle.mdx │ ├── Interface.AndroidChannel.mdx │ ├── Interface.AndroidChannelGroup.mdx │ ├── Interface.AndroidInboxStyle.mdx │ ├── Interface.AndroidInput.mdx │ ├── Interface.AndroidMessagingStyle.mdx │ ├── Interface.AndroidMessagingStyleMessage.mdx │ ├── Interface.AndroidNotificationSettings.mdx │ ├── Interface.AndroidPerson.mdx │ ├── Interface.AndroidProgress.mdx │ ├── Interface.DisplayedNotification.mdx │ ├── Interface.Event.mdx │ ├── Interface.EventDetail.mdx │ ├── Interface.IOSAttachmentThumbnailClippingRect.mdx │ ├── Interface.IOSCommunicationInfo.mdx │ ├── Interface.IOSCommunicationInfoPerson.mdx │ ├── Interface.IOSForegroundPresentationOptions.mdx │ ├── Interface.IOSInput.mdx │ ├── Interface.IOSNotificationAttachment.mdx │ ├── Interface.IOSNotificationCategory.mdx │ ├── Interface.IOSNotificationCategoryAction.mdx │ ├── Interface.IOSNotificationPermissions.mdx │ ├── Interface.IOSNotificationSettings.mdx │ ├── Interface.InitialNotification.mdx │ ├── Interface.IntervalTrigger.mdx │ ├── Interface.NativeAndroidChannel.mdx │ ├── Interface.NativeAndroidChannelGroup.mdx │ ├── Interface.NativeError.mdx │ ├── Interface.Notification.mdx │ ├── Interface.NotificationAndroid.mdx │ ├── Interface.NotificationFullScreenAction.mdx │ ├── Interface.NotificationIOS.mdx │ ├── Interface.NotificationPressAction.mdx │ ├── Interface.NotificationSettings.mdx │ ├── Interface.TimestampTrigger.mdx │ ├── Interface.TimestampTriggerAlarmManager.mdx │ ├── Interface.TriggerNotification.mdx │ ├── TypeAlias.ForegroundServiceTask.mdx │ ├── TypeAlias.IOSNotificationInterruptionLevel.mdx │ ├── TypeAlias.Trigger.mdx │ ├── Variable.default.mdx │ └── index.mdx │ ├── release-notes.mdx │ ├── triggers.mdx │ └── usage.mdx ├── ios ├── .editorconfig ├── NotifeeCore.podspec ├── NotifeeCore.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Framework.xcscheme └── NotifeeCore │ ├── Info.plist │ ├── NotifeeCore+NSNotificationCenter.h │ ├── NotifeeCore+NSNotificationCenter.m │ ├── NotifeeCore+NSURLSession.h │ ├── NotifeeCore+NSURLSession.m │ ├── NotifeeCore+UNUserNotificationCenter.h │ ├── NotifeeCore+UNUserNotificationCenter.m │ ├── NotifeeCore.h │ ├── NotifeeCore.m │ ├── NotifeeCoreDelegateHolder.h │ ├── NotifeeCoreDelegateHolder.m │ ├── NotifeeCoreDownloadDelegate.h │ ├── NotifeeCoreDownloadDelegate.m │ ├── NotifeeCoreExtensionHelper.h │ ├── NotifeeCoreExtensionHelper.m │ ├── NotifeeCoreUtil.h │ └── NotifeeCoreUtil.m ├── lerna.json ├── metro.config.js ├── package.json ├── packages ├── flutter │ ├── .gitignore │ ├── melos.yaml │ ├── packages │ │ ├── notifee │ │ │ ├── .gitignore │ │ │ ├── .metadata │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── analysis_options.yaml │ │ │ ├── android │ │ │ │ ├── .gitignore │ │ │ │ ├── build.gradle │ │ │ │ ├── gradle │ │ │ │ │ └── wrapper │ │ │ │ │ │ └── gradle-wrapper.properties │ │ │ │ ├── libs │ │ │ │ │ └── app │ │ │ │ │ │ └── notifee │ │ │ │ │ │ └── core │ │ │ │ │ │ ├── 202108261754 │ │ │ │ │ │ ├── core-202108261754.aar │ │ │ │ │ │ ├── core-202108261754.aar.md5 │ │ │ │ │ │ ├── core-202108261754.aar.sha1 │ │ │ │ │ │ ├── core-202108261754.aar.sha256 │ │ │ │ │ │ ├── core-202108261754.aar.sha512 │ │ │ │ │ │ ├── core-202108261754.pom │ │ │ │ │ │ ├── core-202108261754.pom.md5 │ │ │ │ │ │ ├── core-202108261754.pom.sha1 │ │ │ │ │ │ ├── core-202108261754.pom.sha256 │ │ │ │ │ │ └── core-202108261754.pom.sha512 │ │ │ │ │ │ ├── maven-metadata.xml │ │ │ │ │ │ ├── maven-metadata.xml.md5 │ │ │ │ │ │ ├── maven-metadata.xml.sha1 │ │ │ │ │ │ ├── maven-metadata.xml.sha256 │ │ │ │ │ │ └── maven-metadata.xml.sha512 │ │ │ │ ├── settings.gradle │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── java │ │ │ │ │ └── io │ │ │ │ │ └── flutter │ │ │ │ │ └── plugins │ │ │ │ │ └── notifee │ │ │ │ │ ├── ForegroundEventStreamHandler.java │ │ │ │ │ ├── NotifeeEventSubscriber.java │ │ │ │ │ ├── NotifeePlugin.java │ │ │ │ │ ├── Utils.java │ │ │ │ │ └── background │ │ │ │ │ ├── BackgroundExecutor.java │ │ │ │ │ ├── BackgroundUtils.java │ │ │ │ │ ├── FlutterBackgroundService.java │ │ │ │ │ └── JobIntentService.java │ │ │ ├── example │ │ │ │ ├── .metadata │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── android │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── app │ │ │ │ │ │ ├── build.gradle │ │ │ │ │ │ └── src │ │ │ │ │ │ │ ├── debug │ │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ │ │ ├── main │ │ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ │ │ ├── kotlin │ │ │ │ │ │ │ │ └── com │ │ │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ │ │ │ └── res │ │ │ │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ │ ├── raw │ │ │ │ │ │ │ │ ├── hollow.mp3 │ │ │ │ │ │ │ │ └── horse.mp3 │ │ │ │ │ │ │ │ ├── values-night │ │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ │ │ └── values │ │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ │ └── profile │ │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ ├── build.gradle │ │ │ │ │ ├── gradle.properties │ │ │ │ │ ├── gradle │ │ │ │ │ │ └── wrapper │ │ │ │ │ │ │ └── gradle-wrapper.properties │ │ │ │ │ └── settings.gradle │ │ │ │ ├── ios │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── Flutter │ │ │ │ │ │ ├── AppFrameworkInfo.plist │ │ │ │ │ │ ├── Debug.xcconfig │ │ │ │ │ │ └── Release.xcconfig │ │ │ │ │ ├── Podfile │ │ │ │ │ ├── Podfile.lock │ │ │ │ │ ├── Runner.xcodeproj │ │ │ │ │ │ ├── project.pbxproj │ │ │ │ │ │ ├── project.xcworkspace │ │ │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ │ │ └── xcshareddata │ │ │ │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ │ │ │ └── xcshareddata │ │ │ │ │ │ │ └── xcschemes │ │ │ │ │ │ │ └── Runner.xcscheme │ │ │ │ │ ├── Runner.xcworkspace │ │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ │ └── xcshareddata │ │ │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ │ │ └── Runner │ │ │ │ │ │ ├── AppDelegate.swift │ │ │ │ │ │ ├── Assets.xcassets │ │ │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ │ │ │ └── LaunchImage.imageset │ │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── Base.lproj │ │ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ │ │ └── Main.storyboard │ │ │ │ │ │ ├── Info.plist │ │ │ │ │ │ ├── Runner-Bridging-Header.h │ │ │ │ │ │ └── Runner.entitlements │ │ │ │ ├── lib │ │ │ │ │ ├── example_notifications.dart │ │ │ │ │ ├── main.dart │ │ │ │ │ ├── notification_list.dart │ │ │ │ │ ├── notification_list_item.dart │ │ │ │ │ ├── permissions.dart │ │ │ │ │ ├── trigger_notification_list.dart │ │ │ │ │ └── trigger_notification_list_item.dart │ │ │ │ ├── pubspec.lock │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test_driver │ │ │ │ │ ├── notifee_e2e.dart │ │ │ │ │ └── notifee_e2e_test.dart │ │ │ │ └── web │ │ │ │ │ ├── favicon.png │ │ │ │ │ ├── icons │ │ │ │ │ ├── Icon-192.png │ │ │ │ │ ├── Icon-512.png │ │ │ │ │ ├── Icon-maskable-192.png │ │ │ │ │ └── Icon-maskable-512.png │ │ │ │ │ ├── index.html │ │ │ │ │ └── manifest.json │ │ │ ├── ios │ │ │ │ ├── .gitignore │ │ │ │ ├── Assets │ │ │ │ │ └── .gitkeep │ │ │ │ ├── Classes │ │ │ │ │ ├── NotifeePlugin.h │ │ │ │ │ ├── NotifeePlugin.m │ │ │ │ │ └── NotifeePluginSwift.swift │ │ │ │ └── notifee.podspec │ │ │ ├── lib │ │ │ │ ├── notifee.dart │ │ │ │ └── src │ │ │ │ │ └── notifee.dart │ │ │ ├── pubspec.lock │ │ │ ├── pubspec.yaml │ │ │ └── test │ │ │ │ └── notifee_test.dart │ │ └── notifee_platform_interface │ │ │ ├── .gitignore │ │ │ ├── .metadata │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── analysis_options.yaml │ │ │ ├── build.yaml │ │ │ ├── lib │ │ │ ├── notifee_platform_interface.dart │ │ │ └── src │ │ │ │ ├── method_channel │ │ │ │ ├── method_channel_notifee.dart │ │ │ │ └── types.dart │ │ │ │ ├── models │ │ │ │ ├── event │ │ │ │ │ ├── event.dart │ │ │ │ │ ├── event_detail.dart │ │ │ │ │ ├── event_type.dart │ │ │ │ │ ├── native_android_channel.dart │ │ │ │ │ └── native_android_channel_group.dart │ │ │ │ ├── initial_notification.dart │ │ │ │ ├── notification │ │ │ │ │ ├── android │ │ │ │ │ │ ├── android_enums.dart │ │ │ │ │ │ ├── channel.dart │ │ │ │ │ │ ├── channel_group.dart │ │ │ │ │ │ └── notification_press_action.dart │ │ │ │ │ ├── ios │ │ │ │ │ │ ├── foreground_presentation_options.dart │ │ │ │ │ │ ├── ios_attachment_thumbnail_clipping_rect.dart │ │ │ │ │ │ ├── ios_enums.dart │ │ │ │ │ │ ├── ios_notification_attachment.dart │ │ │ │ │ │ ├── ios_notification_category.dart │ │ │ │ │ │ ├── ios_notification_category_action.dart │ │ │ │ │ │ └── ios_notification_permissions.dart │ │ │ │ │ ├── notification.dart │ │ │ │ │ ├── notification_android.dart │ │ │ │ │ ├── notification_ios.dart │ │ │ │ │ └── notification_settings.dart │ │ │ │ ├── trigger │ │ │ │ │ ├── interval_trigger.dart │ │ │ │ │ ├── timestamp_trigger.dart │ │ │ │ │ └── trigger_type.dart │ │ │ │ └── trigger_notification.dart │ │ │ │ ├── platform_interface │ │ │ │ └── platform_interface_notifee.dart │ │ │ │ └── utils │ │ │ │ └── generate_id.dart │ │ │ ├── pubspec.lock │ │ │ ├── pubspec.yaml │ │ │ └── test │ │ │ ├── method_channel_test │ │ │ └── method_channel_notifee_test.dart │ │ │ ├── models │ │ │ └── initial_notification_test.dart │ │ │ └── platform_interface_test │ │ │ └── platform_interface_notifee_test.dart │ ├── pubspec.lock │ └── pubspec.yaml └── react-native │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .gitattributes │ ├── .gitignore │ ├── .npmignore │ ├── .prettierignore │ ├── .prettierrc │ ├── LICENSE │ ├── README.md │ ├── RNNotifee.podspec │ ├── RNNotifeeCore.podspec │ ├── android │ ├── .editorconfig │ ├── build.gradle │ ├── gradle.properties │ ├── libs │ │ └── app │ │ │ └── notifee │ │ │ └── core │ │ │ ├── 202108261754 │ │ │ ├── core-202108261754.aar │ │ │ ├── core-202108261754.aar.md5 │ │ │ ├── core-202108261754.aar.sha1 │ │ │ ├── core-202108261754.aar.sha256 │ │ │ ├── core-202108261754.aar.sha512 │ │ │ ├── core-202108261754.pom │ │ │ ├── core-202108261754.pom.md5 │ │ │ ├── core-202108261754.pom.sha1 │ │ │ ├── core-202108261754.pom.sha256 │ │ │ └── core-202108261754.pom.sha512 │ │ │ ├── maven-metadata.xml │ │ │ ├── maven-metadata.xml.md5 │ │ │ ├── maven-metadata.xml.sha1 │ │ │ ├── maven-metadata.xml.sha256 │ │ │ └── maven-metadata.xml.sha512 │ ├── lint.xml │ ├── proguard-rules.pro │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── io │ │ └── invertase │ │ └── notifee │ │ ├── HeadlessTask.java │ │ ├── NotifeeApiModule.java │ │ ├── NotifeeEventSubscriber.java │ │ ├── NotifeeInitProvider.java │ │ ├── NotifeePackage.java │ │ └── NotifeeReactUtils.java │ ├── example │ ├── .buckconfig │ ├── .bundle │ │ └── config │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.js │ ├── .ruby-version │ ├── .watchmanconfig │ ├── App.tsx │ ├── Gemfile │ ├── README.md │ ├── __tests__ │ │ └── App.test.tsx │ ├── _node-version │ ├── android │ │ ├── app │ │ │ ├── _BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ ├── CustomActivity.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── MainApplication.java │ │ │ │ │ └── newarchitecture │ │ │ │ │ ├── MainApplicationReactNativeHost.java │ │ │ │ │ ├── components │ │ │ │ │ └── MainComponentsRegistry.java │ │ │ │ │ └── modules │ │ │ │ │ └── MainApplicationTurboModuleManagerDelegate.java │ │ │ │ ├── jni │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── MainApplicationModuleProvider.cpp │ │ │ │ ├── MainApplicationModuleProvider.h │ │ │ │ ├── MainApplicationTurboModuleManagerDelegate.cpp │ │ │ │ ├── MainApplicationTurboModuleManagerDelegate.h │ │ │ │ ├── MainComponentsRegistry.cpp │ │ │ │ ├── MainComponentsRegistry.h │ │ │ │ └── OnLoad.cpp │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── _xcode.env │ │ ├── example.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── example.xcscheme │ │ ├── example.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── example │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.mm │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── main.m │ │ └── exampleTests │ │ │ ├── Info.plist │ │ │ └── exampleTests.m │ ├── jestSetup.js │ ├── metro.config.js │ ├── package.json │ ├── src │ │ ├── content.tsx │ │ └── utils │ │ │ ├── categories.ts │ │ │ ├── notifications.ts │ │ │ └── triggers.ts │ └── tsconfig.json │ ├── ios │ ├── RNNotifee.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── RNNotifee │ │ ├── NotifeeApiModule.h │ │ ├── NotifeeApiModule.m │ │ ├── NotifeeExtensionHelper.h │ │ └── NotifeeExtensionHelper.m │ ├── jest-mock.js │ ├── package.json │ ├── react-native.config.js │ ├── refresh-example.sh │ ├── src │ ├── NotifeeApiModule.ts │ ├── NotifeeJSEventEmitter.ts │ ├── NotifeeNativeError.ts │ ├── NotifeeNativeModule.ts │ ├── NotifeeNativeModule.web.ts │ ├── __mocks__ │ │ └── NotifeeNativeModule.ts │ ├── index.ts │ ├── types │ │ ├── Library.ts │ │ ├── Module.ts │ │ ├── Notification.ts │ │ ├── NotificationAndroid.ts │ │ ├── NotificationIOS.ts │ │ ├── NotificationWeb.ts │ │ ├── PowerManagerInfo.ts │ │ └── Trigger.ts │ ├── utils │ │ ├── id.ts │ │ ├── index.ts │ │ └── validate.ts │ └── validators │ │ ├── iosCommunicationInfo │ │ ├── validateIOSCommunicationInfo.ts │ │ └── validateIOSCommunicationInfoPerson.ts │ │ ├── validate.ts │ │ ├── validateAndroidAction.ts │ │ ├── validateAndroidChannel.ts │ │ ├── validateAndroidChannelGroup.ts │ │ ├── validateAndroidFullScreenAction.ts │ │ ├── validateAndroidInput.ts │ │ ├── validateAndroidNotification.ts │ │ ├── validateAndroidPressAction.ts │ │ ├── validateAndroidStyle.ts │ │ ├── validateIOSAttachment.ts │ │ ├── validateIOSCategory.ts │ │ ├── validateIOSCategoryAction.ts │ │ ├── validateIOSInput.ts │ │ ├── validateIOSNotification.ts │ │ ├── validateIOSPermissions.ts │ │ ├── validateNotification.ts │ │ └── validateTrigger.ts │ └── tsconfig.json ├── tests_react_native ├── .buckconfig ├── .editorconfig ├── .flowconfig ├── .watchmanconfig ├── README.md ├── __tests__ │ ├── NotifeeApiModule.test.ts │ ├── notifeeAppModule.test.ts │ ├── testSetup.ts │ └── validators │ │ ├── validate.test.ts │ │ ├── validateAndriodAction.test.ts │ │ ├── validateAndroidChannel.test.ts │ │ ├── validateAndroidChannelGroup.test.ts │ │ ├── validateAndroidFullScreenAction.test.ts │ │ ├── validateAndroidInput.test.ts │ │ ├── validateAndroidNotification.test.ts │ │ ├── validateAndroidPressAction.test.ts │ │ ├── validateAndroidStyle.test.ts │ │ ├── validateIOSAttachment.test.ts │ │ ├── validateIOSCategory.test.ts │ │ ├── validateIOSCategoryAction.test.ts │ │ ├── validateIOSInput.test.ts │ │ ├── validateIOSNotification.test.ts │ │ ├── validateIOSPermissions.test.ts │ │ ├── validateNotifications.test.ts │ │ └── validateTrigger.test.ts ├── android │ ├── .editorconfig │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── google-services.json │ │ ├── keystore.jks │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── invertase │ │ │ │ └── testing │ │ │ │ └── NotifeeTest.java │ │ │ ├── debug │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── drawable_test-web.png │ │ │ ├── ic_launcher-web.png │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── notifee │ │ │ │ │ └── testing │ │ │ │ │ ├── FullScreenActivity.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ ├── mipmap_test-web.png │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_small_icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_small_icon.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_small_icon.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_small_icon.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_small_icon.png │ │ │ │ ├── drawable │ │ │ │ ├── drawable_test_foreground.xml │ │ │ │ ├── mipmap_test_background.xml │ │ │ │ ├── mipmap_test_foreground.xml │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── drawable_test.xml │ │ │ │ ├── drawable_test_round.xml │ │ │ │ ├── ic_launcher.xml │ │ │ │ ├── ic_launcher_round.xml │ │ │ │ ├── mipmap_test.xml │ │ │ │ └── mipmap_test_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── drawable_test.png │ │ │ │ ├── drawable_test_round.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── mipmap_test.png │ │ │ │ └── mipmap_test_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── drawable_test.png │ │ │ │ ├── drawable_test_round.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── mipmap_test.png │ │ │ │ └── mipmap_test_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── drawable_test.png │ │ │ │ ├── drawable_test_round.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── mipmap_test.png │ │ │ │ └── mipmap_test_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── drawable_test.png │ │ │ │ ├── drawable_test_round.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── mipmap_test.png │ │ │ │ └── mipmap_test_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── drawable_test.png │ │ │ │ ├── drawable_test_round.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── mipmap_test.png │ │ │ │ └── mipmap_test_round.png │ │ │ │ ├── raw │ │ │ │ ├── hollow.mp3 │ │ │ │ └── horse.mp3 │ │ │ │ ├── values │ │ │ │ ├── drawable_test_background.xml │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ │ └── xml │ │ │ │ └── remote_config_resource_test.xml │ │ │ └── staging │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── keystores │ │ ├── BUCK │ │ └── debug.keystore.properties │ └── settings.gradle ├── assets │ ├── horse.mp3 │ ├── notifee-logo.png │ └── notifee_logo_full.png ├── babel.config.js ├── example │ ├── app.tsx │ ├── ios-test.tsx │ ├── notifications.ts │ ├── videoApp.tsx │ └── videos.ts ├── index.js ├── index.test.js ├── ios │ ├── .editorconfig │ ├── .xcode.env │ ├── GoogleService-Info.plist │ ├── NotifeeContentExtension │ │ ├── Base.lproj │ │ │ └── MainInterface.storyboard │ │ ├── Info.plist │ │ ├── NotificationViewController.h │ │ └── NotificationViewController.m │ ├── NotifeeTestingNSE │ │ ├── Info.plist │ │ ├── NotificationService.h │ │ └── NotificationService.m │ ├── Podfile │ ├── Podfile.lock │ ├── testing.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── Notifee.xcscheme │ │ │ ├── NotifeeContentExtension.xcscheme │ │ │ └── testing Release.xcscheme │ ├── testing.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── testing │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── notifee-logo-1024.png │ │ │ │ ├── notifee-logo-20@2x.png │ │ │ │ ├── notifee-logo-20@3x.png │ │ │ │ ├── notifee-logo-29@2x.png │ │ │ │ ├── notifee-logo-29@3x.png │ │ │ │ ├── notifee-logo-40@2x.png │ │ │ │ ├── notifee-logo-40@3x.png │ │ │ │ ├── notifee-logo-60@2x.png │ │ │ │ └── notifee-logo-60@3x.png │ │ ├── Info.plist │ │ ├── NotifeeRelease.entitlements │ │ ├── main.m │ │ ├── media │ │ │ ├── cat.png │ │ │ ├── dog.mp4 │ │ │ └── kick.wav │ │ └── testing.entitlements │ └── testingTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── jest-mock.js ├── jest.config.js ├── metro.config.js ├── package.json ├── patches │ ├── .gitkeep │ └── cavy-native-reporter+0.1.3.patch ├── sendPushNotification.js └── specs │ ├── api.spec.ts │ └── notification.spec.ts ├── tsconfig.docs.json ├── tsconfig.json ├── typedoc.config.mjs └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | [android] 2 | target = android-28 3 | 4 | [download] 5 | max_number_of_retries = 3 6 | 7 | [maven_repositories] 8 | central = https://repo1.maven.org/maven2 9 | google = https://dl.google.com/dl/android/maven2/ 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | version.ts 2 | node_modules 3 | scripts/ 4 | coverage 5 | docs 6 | dist 7 | android 8 | packages/**/plugin/build/** 9 | sendPushNotification.js 10 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', // Specifies the ESLint parser 3 | extends: [ 4 | '@react-native-community', 5 | 'plugin:react/recommended', 6 | 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin 7 | 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 8 | ], 9 | parserOptions: { 10 | ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features 11 | sourceType: 'module', // Allows for the use of imports 12 | ecmaFeatures: { 13 | jsx: true, // Allows for the parsing of JSX 14 | }, 15 | }, 16 | settings: { 17 | react: { 18 | version: '18', 19 | }, 20 | }, 21 | rules: { 22 | '@typescript-eslint/no-use-before-define': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | camelcase: 'off', 25 | '@typescript-eslint/camelcase': 'off', 26 | 'react/jsx-uses-vars': 1, 27 | 'jest/no-identical-title': 0, 28 | 'eslint-comments/no-unlimited-disable': 0, 29 | // off for validation tests 30 | '@typescript-eslint/ban-ts-comment': 'off', 31 | }, 32 | }; 33 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.xcodeproj binary 2 | *.xcworkspace binary 3 | docs/typedoc.json merge=theirs linguist-vendored 4 | docs/typedoc.min.json merge=theirs linguist-vendored 5 | -------------------------------------------------------------------------------- /.github/workflows/docs_deployment.yml: -------------------------------------------------------------------------------- 1 | name: Docs Deployment 2 | on: 3 | push: 4 | branches: 5 | - main 6 | paths: 7 | - 'docs-react-native/**' 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Trigger Netlify Build Hook 14 | run: curl -s -X POST -d {} "https://api.netlify.com/build_hooks/${TOKEN}" 15 | env: 16 | TOKEN: ${{ secrets.NETLIFY_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/workflows/pr_title.yml: -------------------------------------------------------------------------------- 1 | name: 'PR Title is Conventional' 2 | on: 3 | pull_request_target: 4 | types: 5 | - opened 6 | - edited 7 | - synchronize 8 | 9 | jobs: 10 | main: 11 | name: Conventional PR Title 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: amannn/action-semantic-pull-request@v5.4.0 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | with: 18 | validateSingleCommit: true 19 | -------------------------------------------------------------------------------- /.github/workflows/scripts/install-flutter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BRANCH=$1 4 | git clone https://github.com/flutter/flutter.git --depth 1 -b $BRANCH "$GITHUB_WORKSPACE/_flutter" 5 | echo "$GITHUB_WORKSPACE/_flutter/bin" >> $GITHUB_PATH -------------------------------------------------------------------------------- /.github/workflows/scripts/install-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | flutter config --no-analytics 4 | flutter pub global activate melos 5 | flutter pub global activate flutter_plugin_tools 6 | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH 7 | echo "$GITHUB_WORKSPACE/_flutter/.pub-cache/bin" >> $GITHUB_PATH 8 | echo "$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin" >> $GITHUB_PATH -------------------------------------------------------------------------------- /.github/workflows/scripts/validate-formatting.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $(git ls-files *[^pubspec.lock] --modified) ]]; then 3 | echo "" 4 | echo "" 5 | echo "These files are not formatted correctly:" 6 | for f in $(git ls-files --modified); do 7 | echo "" 8 | echo "" 9 | echo "-----------------------------------------------------------------" 10 | echo "$f" 11 | echo "-----------------------------------------------------------------" 12 | echo "" 13 | git --no-pager diff --unified=0 --minimal $f 14 | echo "" 15 | echo "-----------------------------------------------------------------" 16 | echo "" 17 | echo "" 18 | done 19 | if [[ $GITHUB_WORKFLOW ]]; then 20 | git checkout . > /dev/null 2>&1 21 | fi 22 | echo "" 23 | echo "❌ Some files are incorrectly formatted, see above output." 24 | echo "" 25 | echo "To fix these locally, run: 'melos run format'." 26 | exit 1 27 | else 28 | echo "" 29 | echo "✅ All files are formatted correctly." 30 | fi -------------------------------------------------------------------------------- /.github/workflows/tests_junit.yml: -------------------------------------------------------------------------------- 1 | name: JUnit Tests 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | paths: 7 | - '.github/workflows/*.yml' 8 | - 'docs/**' 9 | - 'android/**' 10 | push: 11 | branches: 12 | - main 13 | paths-ignore: 14 | - 'docs/**' 15 | - '**/*.md' 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.ref }} 19 | cancel-in-progress: true 20 | 21 | jobs: 22 | unit: 23 | name: JUnit Tests 24 | timeout-minutes: 20 25 | runs-on: ubuntu-latest 26 | steps: 27 | - uses: actions/checkout@v4 28 | with: 29 | fetch-depth: 50 30 | 31 | - name: Configure JDK 32 | uses: actions/setup-java@v4 33 | with: 34 | distribution: 'temurin' 35 | java-version: '17' 36 | 37 | - name: Gradle Cache 38 | uses: actions/cache@v4 39 | with: 40 | path: ~/.gradle/caches 41 | key: ${{ runner.os }}-gradle-${{ hashFiles('android/build.gradle*') }}-v1 42 | 43 | - name: Resolve Gradle Dependencies 44 | uses: nick-fields/retry@v3 45 | with: 46 | timeout_minutes: 10 47 | retry_wait_seconds: 60 48 | max_attempts: 3 49 | command: yarn build:core:android 50 | 51 | - name: Run JUnit Tests 52 | run: yarn test:core:android 53 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | legacy-peer-deps=true -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | node_modules 3 | dist 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "trailingComma": "all", 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "bracketSpacing": true, 8 | "bracketSameLine": false, 9 | "tabWidth": 2, 10 | "printWidth": 100 11 | } 12 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.releaserc.react-native-path-filter.js", 3 | "tagFormat": "@notifee/react-native@${version}", 4 | "plugins": [ 5 | [ 6 | "@semantic-release/commit-analyzer", 7 | { 8 | "preset": "conventionalcommits" 9 | } 10 | ], 11 | [ 12 | "@semantic-release/release-notes-generator", 13 | { 14 | "preset": "conventionalcommits" 15 | } 16 | ], 17 | [ 18 | "@semantic-release/changelog", 19 | { 20 | "changelogFile": "docs/react-native/release-notes.mdx", 21 | "changelogTitle": "---\ntitle: Releases\ndescription: Notifee API releases\n---" 22 | } 23 | ], 24 | [ 25 | "@semantic-release/npm", 26 | { 27 | "pkgRoot": "packages/react-native", 28 | "npmPublish": true 29 | } 30 | ], 31 | "@semantic-release/github", 32 | [ 33 | "@semantic-release/git", 34 | { 35 | "assets": [ 36 | "docs/react-native/", 37 | "packages/react-native/package.json", 38 | "packages/react-native/android/libs" 39 | ], 40 | "message": "chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}" 41 | } 42 | ] 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /.releaserc.react-native-path-filter.js: -------------------------------------------------------------------------------- 1 | path = require('path'); 2 | 3 | const reactNativePaths = ['ios', 'android', 'packages/react-native', 'build_ios_core.sh']; 4 | 5 | Object.keys(require.cache) 6 | .filter(m => path.posix.normalize(m).endsWith('/node_modules/git-log-parser/src/index.js')) 7 | .forEach(moduleName => { 8 | const parse = require.cache[moduleName].exports.parse; 9 | require.cache[moduleName].exports.parse = ( 10 | config, 11 | options, 12 | ) => { 13 | // set the `_` "raw value(s)" param of git-log-parser config to be an array 14 | // of raw values containing whatever is in there now, along with our filter paths 15 | // at the end so we only get git-log for those paths 16 | if (Array.isArray(config._)) config._ = config._.concat(reactNativePaths); 17 | else if (config._) config._ = [config._, ...reactNativePaths]; 18 | else config._ = reactNativePaths; 19 | return parse(config, options); 20 | }; 21 | }); 22 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /android/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig 2 | root = true 3 | 4 | [*] 5 | max_line_length = 80 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -keepattributes *Annotation* 2 | -keepclassmembers class * { 3 | @org.greenrobot.eventbus.Subscribe ; 4 | } 5 | -keep enum org.greenrobot.eventbus.ThreadMode { *; } 6 | 7 | # And if you use AsyncExecutor: 8 | -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { 9 | (java.lang.Throwable); 10 | } 11 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | org.gradle.caching=true 3 | org.gradle.parallel=true 4 | org.gradle.configureondemand=true 5 | org.gradle.jvmargs=-Xmx3g -Dfile.encoding=UTF-8 6 | android.useAndroidX=true 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = '@notifee_core' 2 | -------------------------------------------------------------------------------- /android/src/androidTest/java/app/notifee/core/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import android.content.Context; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | import androidx.test.platform.app.InstrumentationRegistry; 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * @see Testing documentation 15 | */ 16 | @RunWith(AndroidJUnit4.class) 17 | public class ExampleInstrumentedTest { 18 | @Test 19 | public void useAppContext() { 20 | // Context of the app under test. 21 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 22 | 23 | assertEquals("app.notifee.core.test", appContext.getPackageName()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/AlarmPermissionBroadcastReceiver.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core; 2 | 3 | import static android.app.AlarmManager.ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED; 4 | 5 | import android.content.BroadcastReceiver; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.util.Log; 9 | 10 | public class AlarmPermissionBroadcastReceiver extends BroadcastReceiver { 11 | @Override 12 | public void onReceive(Context context, Intent intent) { 13 | 14 | if (intent.getAction().equals(ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED)) { 15 | Log.i("AlarmPermissionReceiver", "Received alarm permission state changed event"); 16 | new NotifeeAlarmManager().rescheduleNotifications(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/ContextHolder.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import android.content.Context; 21 | 22 | public class ContextHolder { 23 | private static Context applicationContext; 24 | 25 | public static Context getApplicationContext() { 26 | return applicationContext; 27 | } 28 | 29 | public static void setApplicationContext(Context applicationContext) { 30 | Logger.d("context", "received application context"); 31 | ContextHolder.applicationContext = applicationContext; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/KeepForSdk.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import java.lang.annotation.Documented; 21 | import java.lang.annotation.ElementType; 22 | import java.lang.annotation.Target; 23 | 24 | @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) 25 | @Documented 26 | public @interface KeepForSdk {} 27 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/NotificationAlarmReceiver.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | 24 | /* 25 | * This is invoked by the Alarm Manager when it is time to display a scheduled notification. 26 | */ 27 | public class NotificationAlarmReceiver extends BroadcastReceiver { 28 | @Override 29 | public void onReceive(Context context, Intent intent) { 30 | new NotifeeAlarmManager().displayScheduledNotification(intent.getExtras()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/NotificationReceiverActivity.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import android.app.Activity; 21 | import android.content.Intent; 22 | import android.os.Bundle; 23 | 24 | // For Android 12 + 25 | public class NotificationReceiverActivity extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | NotificationReceiverHandler.handleNotification(this, getIntent()); 30 | finish(); 31 | } 32 | 33 | @Override 34 | protected void onNewIntent(Intent intent) { 35 | super.onNewIntent(intent); 36 | NotificationReceiverHandler.handleNotification(this, intent); 37 | finish(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/event/MainComponentEvent.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core.event; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import androidx.annotation.NonNull; 21 | 22 | public class MainComponentEvent { 23 | 24 | private String mainComponent; 25 | 26 | public MainComponentEvent(@NonNull String mainComponent) { 27 | this.mainComponent = mainComponent; 28 | } 29 | 30 | public String getMainComponent() { 31 | return mainComponent; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/interfaces/EventListener.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core.interfaces; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import app.notifee.core.KeepForSdk; 21 | import app.notifee.core.event.BlockStateEvent; 22 | import app.notifee.core.event.ForegroundServiceEvent; 23 | import app.notifee.core.event.LogEvent; 24 | import app.notifee.core.event.NotificationEvent; 25 | 26 | @KeepForSdk 27 | public interface EventListener { 28 | @KeepForSdk 29 | void onNotificationEvent(NotificationEvent notificationEvent); 30 | 31 | @KeepForSdk 32 | void onLogEvent(LogEvent logEvent); 33 | 34 | @KeepForSdk 35 | void onBlockStateEvent(BlockStateEvent blockStateEvent); 36 | 37 | @KeepForSdk 38 | void onForegroundServiceEvent(ForegroundServiceEvent foregroundServiceEvent); 39 | } 40 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/interfaces/MethodCallResult.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core.interfaces; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import androidx.annotation.Nullable; 21 | import app.notifee.core.KeepForSdk; 22 | 23 | @KeepForSdk 24 | public interface MethodCallResult { 25 | @KeepForSdk 26 | void onComplete(@Nullable Exception error, T result); 27 | } 28 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/model/package-info.java: -------------------------------------------------------------------------------- 1 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) 2 | package app.notifee.core.model; 3 | 4 | import androidx.annotation.RestrictTo; 5 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/utility/Callbackable.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core.utility; 2 | 3 | import androidx.annotation.Nullable; 4 | 5 | /** 6 | * Since lambda functions are not supported prior to SDK 24, and this project's SDK min. is 20, This 7 | * interface was created to pass a function to another object. 8 | */ 9 | public interface Callbackable { 10 | 11 | void call(@Nullable Exception e, @Nullable T result); 12 | } 13 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/utility/TextUtils.java: -------------------------------------------------------------------------------- 1 | package app.notifee.core.utility; 2 | 3 | /* 4 | * Copyright (c) 2016-present Invertase Limited & Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this library except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | import android.text.Spanned; 21 | import androidx.core.text.HtmlCompat; 22 | 23 | public class TextUtils { 24 | 25 | public static Spanned fromHtml(String text) { 26 | return HtmlCompat.fromHtml(text, HtmlCompat.FROM_HTML_MODE_LEGACY); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/src/main/java/app/notifee/core/utility/package-info.java: -------------------------------------------------------------------------------- 1 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) 2 | package app.notifee.core.utility; 3 | 4 | import androidx.annotation.RestrictTo; 5 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/android/src/main/res/drawable/.gitkeep -------------------------------------------------------------------------------- /android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Notifee Core 3 | 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /build_ios_core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | 4 | WORKING_DIR=$(pwd) 5 | POD_NAME="NotifeeCore" 6 | POD_PATH="${WORKING_DIR}/ios/${POD_NAME}" 7 | POD_OUTPUT_FOLDER_BASE=${WORKING_DIR}/packages/react-native/ios 8 | 9 | rm -rf "${POD_OUTPUT_FOLDER_BASE:?}/${POD_NAME}" 10 | echo "Deleted ${POD_OUTPUT_FOLDER_BASE:?}/${POD_NAME}" 11 | 12 | # - Copy the core pod 13 | echo "Moving core into packages/react-native submodule" 14 | cp -rvp "${POD_PATH}" "${POD_OUTPUT_FOLDER_BASE}/" 15 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | notify: 3 | require_ci_to_pass: yes 4 | 5 | coverage: 6 | precision: 2 7 | round: up 8 | range: "40...100" 9 | 10 | status: 11 | project: yes 12 | patch: yes 13 | changes: no 14 | 15 | comment: 16 | layout: "header, diff" 17 | behavior: default 18 | require_changes: no 19 | -------------------------------------------------------------------------------- /docs/assets/notifee.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/docs/assets/notifee.webp -------------------------------------------------------------------------------- /docs/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | redirect: "/react-native/overview" 3 | --- -------------------------------------------------------------------------------- /docs/react-native/debugging.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Debugging 3 | description: Handling errors, enabling logging and viewing logs. 4 | --- 5 | 6 | It's recommended that you wrap `displayNotification` and `createTriggerNotification` in a try/catch to catch any validation errors that may be thrown: 7 | 8 | ```js 9 | try { 10 | await notifee.displayNotification({ 11 | title: 'Chat with Joe Bloggs', 12 | body: 'A new message has been received from a user.', 13 | ... 14 | }); 15 | } catch (e) { 16 | console.log(e); 17 | } 18 | ``` 19 | 20 | ## Native Logs 21 | 22 | ### Android 23 | 24 | - Enable native logs in release mode by running: 25 | 26 | `adb shell setprop log.tag.NOTIFEE DEBUG` 27 | 28 | - To quickly view Android logs in the terminal: 29 | 30 | `adb logcat '*:S' NOTIFEE:D` 31 | -------------------------------------------------------------------------------- /docs/react-native/reference/Enumeration.AndroidFlags.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / AndroidFlags 6 | 7 | # Enumeration: AndroidFlags 8 | 9 | Enum used to set any additional flags supported on Android. 10 | See Android's [setFlag()](https://developer.android.com/reference/android/app/Notification.Builder#setFlag\(int,%20boolean\)) documentation. 11 | 12 | ## Enumeration Members 13 | 14 | ### FLAG\_INSISTENT 15 | 16 | > **FLAG\_INSISTENT**: `4` 17 | 18 | The audio will be repeated until the notification is cancelled or the notification window is opened. 19 | This will be set for you by setting `loopSound`. 20 | 21 | #### Defined in 22 | 23 | [packages/react-native/src/types/NotificationAndroid.ts:1200](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L1200) 24 | 25 | *** 26 | 27 | ### FLAG\_NO\_CLEAR 28 | 29 | > **FLAG\_NO\_CLEAR**: `32` 30 | 31 | Prevents the notification from being canceled when the user clicks the Clear all button. 32 | This will be set for you by setting `ongoing`. 33 | 34 | #### Defined in 35 | 36 | [packages/react-native/src/types/NotificationAndroid.ts:1206](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L1206) 37 | -------------------------------------------------------------------------------- /docs/react-native/reference/Enumeration.RepeatFrequency.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / RepeatFrequency 6 | 7 | # Enumeration: RepeatFrequency 8 | 9 | An interface representing the different frequencies which can be used with `TimestampTrigger.repeatFrequency`. 10 | 11 | View the [Triggers](/react-native/triggers) documentation to learn more. 12 | 13 | ## Enumeration Members 14 | 15 | ### DAILY 16 | 17 | > **DAILY**: `1` 18 | 19 | #### Defined in 20 | 21 | [packages/react-native/src/types/Trigger.ts:80](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L80) 22 | 23 | *** 24 | 25 | ### HOURLY 26 | 27 | > **HOURLY**: `0` 28 | 29 | #### Defined in 30 | 31 | [packages/react-native/src/types/Trigger.ts:79](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L79) 32 | 33 | *** 34 | 35 | ### NONE 36 | 37 | > **NONE**: `-1` 38 | 39 | #### Defined in 40 | 41 | [packages/react-native/src/types/Trigger.ts:78](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L78) 42 | 43 | *** 44 | 45 | ### WEEKLY 46 | 47 | > **WEEKLY**: `2` 48 | 49 | #### Defined in 50 | 51 | [packages/react-native/src/types/Trigger.ts:81](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L81) 52 | -------------------------------------------------------------------------------- /docs/react-native/reference/Enumeration.TimeUnit.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / TimeUnit 6 | 7 | # Enumeration: TimeUnit 8 | 9 | An interface representing the different units of time which can be used with `IntervalTrigger.timeUnit`. 10 | 11 | View the [Triggers](/react-native/triggers) documentation to learn more. 12 | 13 | ## Enumeration Members 14 | 15 | ### DAYS 16 | 17 | > **DAYS**: `"DAYS"` 18 | 19 | #### Defined in 20 | 21 | [packages/react-native/src/types/Trigger.ts:123](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L123) 22 | 23 | *** 24 | 25 | ### HOURS 26 | 27 | > **HOURS**: `"HOURS"` 28 | 29 | #### Defined in 30 | 31 | [packages/react-native/src/types/Trigger.ts:122](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L122) 32 | 33 | *** 34 | 35 | ### MINUTES 36 | 37 | > **MINUTES**: `"MINUTES"` 38 | 39 | #### Defined in 40 | 41 | [packages/react-native/src/types/Trigger.ts:121](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L121) 42 | 43 | *** 44 | 45 | ### SECONDS 46 | 47 | > **SECONDS**: `"SECONDS"` 48 | 49 | #### Defined in 50 | 51 | [packages/react-native/src/types/Trigger.ts:120](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L120) 52 | -------------------------------------------------------------------------------- /docs/react-native/reference/Enumeration.TriggerType.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / TriggerType 6 | 7 | # Enumeration: TriggerType 8 | 9 | Available Trigger Types. 10 | 11 | View the [Triggers](/react-native/triggers) documentation to learn more with example usage. 12 | 13 | ## Enumeration Members 14 | 15 | ### INTERVAL 16 | 17 | > **INTERVAL**: `1` 18 | 19 | #### Defined in 20 | 21 | [packages/react-native/src/types/Trigger.ts:133](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L133) 22 | 23 | *** 24 | 25 | ### TIMESTAMP 26 | 27 | > **TIMESTAMP**: `0` 28 | 29 | #### Defined in 30 | 31 | [packages/react-native/src/types/Trigger.ts:132](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L132) 32 | -------------------------------------------------------------------------------- /docs/react-native/reference/Interface.AndroidNotificationSettings.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / AndroidNotificationSettings 6 | 7 | # Interface: AndroidNotificationSettings 8 | 9 | ## Properties 10 | 11 | ### alarm 12 | 13 | > **alarm**: [`AndroidNotificationSetting`](react-native/reference/Enumeration.AndroidNotificationSetting) 14 | 15 | Enum describing if you can create triggers 16 | 17 | For Android \< 12 / API \< 31, this will default to true 18 | 19 | View the [Trigger](/react-native/android/triggers#android-12-limitations) documentation for more information. 20 | 21 | #### Defined in 22 | 23 | [packages/react-native/src/types/NotificationAndroid.ts:482](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L482) 24 | -------------------------------------------------------------------------------- /docs/react-native/reference/Interface.Event.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / Event 6 | 7 | # Interface: Event 8 | 9 | An interface representing a Notifee event. 10 | 11 | View the [Events](/react-native/events) documentation to learn more about foreground and 12 | background events. 13 | 14 | ## Properties 15 | 16 | ### detail 17 | 18 | > **detail**: [`EventDetail`](react-native/reference/Interface.EventDetail) 19 | 20 | An object containing event detail. 21 | 22 | #### Defined in 23 | 24 | [packages/react-native/src/types/Notification.ts:178](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Notification.ts#L178) 25 | 26 | *** 27 | 28 | ### type 29 | 30 | > **type**: [`EventType`](react-native/reference/Enumeration.EventType) 31 | 32 | The type of notification event. 33 | 34 | #### Defined in 35 | 36 | [packages/react-native/src/types/Notification.ts:173](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Notification.ts#L173) 37 | -------------------------------------------------------------------------------- /docs/react-native/reference/Interface.IOSCommunicationInfoPerson.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / IOSCommunicationInfoPerson 6 | 7 | # Interface: IOSCommunicationInfoPerson 8 | 9 | ## Properties 10 | 11 | ### avatar? 12 | 13 | > `optional` **avatar**: `string` 14 | 15 | #### Defined in 16 | 17 | [packages/react-native/src/types/NotificationIOS.ts:144](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationIOS.ts#L144) 18 | 19 | *** 20 | 21 | ### displayName 22 | 23 | > **displayName**: `string` 24 | 25 | #### Defined in 26 | 27 | [packages/react-native/src/types/NotificationIOS.ts:143](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationIOS.ts#L143) 28 | 29 | *** 30 | 31 | ### id 32 | 33 | > **id**: `string` 34 | 35 | #### Defined in 36 | 37 | [packages/react-native/src/types/NotificationIOS.ts:142](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationIOS.ts#L142) 38 | -------------------------------------------------------------------------------- /docs/react-native/reference/Interface.IOSInput.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / IOSInput 6 | 7 | # Interface: IOSInput 8 | 9 | The interface used to enable advanced user input on a notification. 10 | 11 | View the [Action input](/react-native/ios/interaction#action-input) documentation to learn more. 12 | 13 | ## Platform 14 | 15 | ios 16 | 17 | ## Properties 18 | 19 | ### buttonText? 20 | 21 | > `optional` **buttonText**: `string` 22 | 23 | Overrides the default button text "Send", next to the input box. 24 | 25 | #### Defined in 26 | 27 | [packages/react-native/src/types/NotificationIOS.ts:594](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationIOS.ts#L594) 28 | 29 | *** 30 | 31 | ### placeholderText? 32 | 33 | > `optional` **placeholderText**: `string` 34 | 35 | The placeholder text displayed in the text input field for this action. 36 | 37 | #### Defined in 38 | 39 | [packages/react-native/src/types/NotificationIOS.ts:599](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationIOS.ts#L599) 40 | -------------------------------------------------------------------------------- /docs/react-native/reference/Interface.TimestampTriggerAlarmManager.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / TimestampTriggerAlarmManager 6 | 7 | # Interface: TimestampTriggerAlarmManager 8 | 9 | Interface to specify additional options for the AlarmManager which can be used with `TimestampTrigger.alarmManager`. 10 | 11 | View the [Triggers](/react-native/triggers) documentation to learn more. 12 | 13 | ## Platform 14 | 15 | android 16 | 17 | ## Properties 18 | 19 | ### ~~allowWhileIdle?~~ 20 | 21 | > `optional` **allowWhileIdle**: `boolean` 22 | 23 | #### Deprecated 24 | 25 | ## use `type` instead 26 | 27 | Sets whether your trigger notification should be displayed even when the system is in low-power idle modes. 28 | 29 | Defaults to `false`. 30 | 31 | #### Defined in 32 | 33 | [packages/react-native/src/types/Trigger.ts:66](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L66) 34 | 35 | *** 36 | 37 | ### type? 38 | 39 | > `optional` **type**: [`AlarmType`](react-native/reference/Enumeration.AlarmType) 40 | 41 | The type of alarm set by alarm manager of android 42 | 43 | #### Defined in 44 | 45 | [packages/react-native/src/types/Trigger.ts:69](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L69) 46 | -------------------------------------------------------------------------------- /docs/react-native/reference/Interface.TriggerNotification.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / TriggerNotification 6 | 7 | # Interface: TriggerNotification 8 | 9 | An interface representing a notification that is pending. 10 | 11 | ## Properties 12 | 13 | ### notification 14 | 15 | > **notification**: [`Notification`](react-native/reference/Interface.Notification) 16 | 17 | The notification 18 | 19 | #### Defined in 20 | 21 | [packages/react-native/src/types/Notification.ts:155](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Notification.ts#L155) 22 | 23 | *** 24 | 25 | ### trigger 26 | 27 | > **trigger**: [`Trigger`](react-native/reference/TypeAlias.Trigger) 28 | 29 | The trigger that is used to schedule the notification 30 | 31 | #### Defined in 32 | 33 | [packages/react-native/src/types/Notification.ts:160](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Notification.ts#L160) 34 | -------------------------------------------------------------------------------- /docs/react-native/reference/TypeAlias.ForegroundServiceTask.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / ForegroundServiceTask 6 | 7 | # Type Alias: ForegroundServiceTask() 8 | 9 | > **ForegroundServiceTask**: (`notification`) => `Promise`\<`void`> 10 | 11 | A representation of a Foreground Service task registered via [`registerForegroundService`](/react-native/reference/registerforegroundservice). 12 | 13 | The task must resolve a promise once complete, and in turn removes the notification. 14 | 15 | View the [Foreground Service](/react-native/android/foreground-service) documentation to 16 | learn more. 17 | 18 | ## Parameters 19 | 20 | ### notification 21 | 22 | [`Notification`](react-native/reference/Interface.Notification) 23 | 24 | ## Returns 25 | 26 | `Promise`\<`void`> 27 | 28 | ## Platform 29 | 30 | android 31 | 32 | ## Defined in 33 | 34 | [packages/react-native/src/types/Notification.ts:191](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Notification.ts#L191) 35 | -------------------------------------------------------------------------------- /docs/react-native/reference/TypeAlias.IOSNotificationInterruptionLevel.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / IOSNotificationInterruptionLevel 6 | 7 | # Type Alias: IOSNotificationInterruptionLevel 8 | 9 | > **IOSNotificationInterruptionLevel**: `"active"` | `"critical"` | `"passive"` | `"timeSensitive"` 10 | 11 | Constants that indicate the importance and delivery timing of a notification. 12 | [https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel](https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel) 13 | 14 | ## Platform 15 | 16 | ios 17 | 18 | ## Defined in 19 | 20 | [packages/react-native/src/types/NotificationIOS.ts:683](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/NotificationIOS.ts#L683) 21 | -------------------------------------------------------------------------------- /docs/react-native/reference/TypeAlias.Trigger.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / Trigger 6 | 7 | # Type Alias: Trigger 8 | 9 | > **Trigger**: [`TimestampTrigger`](react-native/reference/Interface.TimestampTrigger) | [`IntervalTrigger`](react-native/reference/Interface.IntervalTrigger) 10 | 11 | ## Defined in 12 | 13 | [packages/react-native/src/types/Trigger.ts:136](https://github.com/invertase/notifee/blob/main/packages/react-native/src/types/Trigger.ts#L136) 14 | -------------------------------------------------------------------------------- /docs/react-native/reference/Variable.default.mdx: -------------------------------------------------------------------------------- 1 | [**@notifee/react-native**](react-native/reference/index) 2 | 3 | *** 4 | 5 | [@notifee/react-native](react-native/reference/index) / default 6 | 7 | # Variable: default 8 | 9 | > `const` **default**: `ModuleWithStatics` 10 | 11 | ## Defined in 12 | 13 | [packages/react-native/src/index.ts:26](https://github.com/invertase/notifee/blob/main/packages/react-native/src/index.ts#L26) 14 | -------------------------------------------------------------------------------- /ios/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /ios/NotifeeCore.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "NotifeeCore" 3 | s.version = "1.0.0" 4 | s.description = "NotifeeCore" 5 | s.summary = <<-DESC 6 | NotifeeCore module - podspec 7 | DESC 8 | s.homepage = "https://notifee.app" 9 | s.license = "Apache 2.0" 10 | s.authors = "Invertase Limited" 11 | s.source = { :git => "https://github.com/invertase/notifee" } 12 | s.social_media_url = 'http://twitter.com/notifee_app' 13 | 14 | s.ios.deployment_target = '10.0' 15 | s.source_files = 'NotifeeCore/*.{h,m}' 16 | end 17 | -------------------------------------------------------------------------------- /ios/NotifeeCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/NotifeeCore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/NotifeeCore/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /ios/NotifeeCore/NotifeeCore+NSNotificationCenter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | #import 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | @interface NotifeeCoreNSNotificationCenter : NSObject 23 | 24 | + (_Nonnull instancetype)instance; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /ios/NotifeeCore/NotifeeCore+NSURLSession.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | #import 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | @interface NotifeeCoreNSURLSession : NSObject 22 | + (NSString *)downloadItemAtURL:(NSURL *)url toFile:(NSString *)localPath error:(NSError **)error; 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /ios/NotifeeCore/NotifeeCoreDelegateHolder.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | #import 19 | #import "NotifeeCore.h" 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface NotifeeCoreDelegateHolder : NSObject 24 | 25 | @property(nonatomic, weak) id delegate; 26 | @property(atomic, strong) NSMutableArray *pendingEvents; 27 | 28 | + (instancetype)instance; 29 | 30 | - (void)didReceiveNotifeeCoreEvent:(NSDictionary *)event; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /ios/NotifeeCore/NotifeeCoreDownloadDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | #import 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | #define MAX_DOWNLOAD_ATTACHMENT_SIZE 50000000 23 | 24 | @interface NotifeeCoreDownloadDelegate : NSObject { 25 | NSError *error; 26 | NSURLResponse *response; 27 | BOOL done; 28 | NSFileHandle *outputHandle; 29 | } 30 | 31 | @property(readonly, getter=isDone) BOOL done; 32 | @property(readonly) NSError *error; 33 | @property(readonly) NSURLResponse *response; 34 | 35 | - (id)initWithFilePath:(NSString *)path; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "npmClientArgs": [ 4 | "--no-lockfile" 5 | ], 6 | "packages": [ 7 | "packages/*", 8 | "tests_react_native" 9 | ], 10 | "useWorkspaces": true, 11 | "command": { 12 | "publish": { 13 | "ignoreChanges": [ 14 | "*.md" 15 | ] 16 | } 17 | }, 18 | "version": "0.2.3" 19 | } 20 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./tests_react_native/metro.config'); 2 | -------------------------------------------------------------------------------- /packages/flutter/.gitignore: -------------------------------------------------------------------------------- 1 | pubspec_overrides.yaml 2 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/README.md: -------------------------------------------------------------------------------- 1 | # Notifee - Flutter 2 | 3 | TODO -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.aar -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.aar.md5: -------------------------------------------------------------------------------- 1 | 1f0fe4d922daafd64ef528f97beafb7c -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha1: -------------------------------------------------------------------------------- 1 | a9cda1115962a578fb6494f042fc077a96ebd7bb -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha256: -------------------------------------------------------------------------------- 1 | 64484a4d97da7d76da15868903dabdc23fc36d8d3b80f16de4139ddab4244526 -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha512: -------------------------------------------------------------------------------- 1 | d064aa3688238c22989a581b5b42870b2fd168ab44e4acbad0f0a21bdfc218bace4e504cb680ec9c033a28c3d1a2440ea6e910c6fb121f5b098c905c2b40ad2a -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | app.notifee 6 | core 7 | 202108261754 8 | aar 9 | 10 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.pom.md5: -------------------------------------------------------------------------------- 1 | 4f6e0cf891e903f91ee3093356815b7a -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha1: -------------------------------------------------------------------------------- 1 | 692dedb13cd922156e38dc5f6bcfba86e4141932 -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha256: -------------------------------------------------------------------------------- 1 | 4f7ea80d7045abd14e8a836ec3a8299a245994b8bbcff7e30d2e3ae7f523c9ec -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha512: -------------------------------------------------------------------------------- 1 | 79244ae770a7c732e5eb33d72ca3e707398ae33d0db8e104d63690fecdb156d9cc040571f09baab30ffb19db3ac00b0283b74f581c1245069b4bf477c590732b -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/maven-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | app.notifee 4 | core 5 | 6 | 202108261754 7 | 202108261754 8 | 9 | 202108261754 10 | 11 | 20211210003824 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/maven-metadata.xml.md5: -------------------------------------------------------------------------------- 1 | 3938e27f0c909ea62c38fab526351f1e -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/maven-metadata.xml.sha1: -------------------------------------------------------------------------------- 1 | 5e732105e5d6d1b0293a2820ae20b9caf708d465 -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/maven-metadata.xml.sha256: -------------------------------------------------------------------------------- 1 | 47c59316e5ffc68aea4c63e5abbb7d3f354fa101c1f1c87446725bba271cf44d -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/libs/app/notifee/core/maven-metadata.xml.sha512: -------------------------------------------------------------------------------- 1 | 606cfeca5b1d259b08af37d323870b154e1c3b4aaf90d5cdce2784cdb6dec1a5410210d82a419199c5e3fa132a9cf751d94b1aa112e85eaba28d22b037ae8d47 -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'notifee' 2 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 7ddd998445191761255c9cd40830c264b1c2e286 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/raw/hollow.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/raw/hollow.mp3 -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/raw/horse.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/android/app/src/main/res/raw/horse.mp3 -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.32' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.0.3' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | // maven { 19 | // url "${project(':notifee').projectDir}/libs" 20 | // } 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | task clean(type: Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip 7 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | 4 | include ':notifee_core' 5 | project(':notifee_core').projectDir = new File(rootProject.projectDir, '../../../../../../android') 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - notifee (0.0.1): 4 | - Flutter 5 | - NotifeeCore 6 | - NotifeeCore (1.0.0) 7 | 8 | DEPENDENCIES: 9 | - Flutter (from `Flutter`) 10 | - notifee (from `.symlinks/plugins/notifee/ios`) 11 | - NotifeeCore (from `../../../../../../ios`) 12 | 13 | EXTERNAL SOURCES: 14 | Flutter: 15 | :path: Flutter 16 | notifee: 17 | :path: ".symlinks/plugins/notifee/ios" 18 | NotifeeCore: 19 | :path: "../../../../../../ios" 20 | 21 | SPEC CHECKSUMS: 22 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 23 | notifee: ca95bd3c1af0b672e48ab176761dd52b27bb2fdc 24 | NotifeeCore: 7163fe1ba23401a81430438a037a40a00221b80e 25 | 26 | PODFILE CHECKSUM: 9112d1b068062660bc8c257b7f3b8834e99e6ada 27 | 28 | COCOAPODS: 1.11.3 29 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/lib/example_notifications.dart: -------------------------------------------------------------------------------- 1 | import 'package:notifee/notifee.dart'; 2 | 3 | /// Used by displayNotification() to demonstrate different [Channel] behaviour 4 | enum ExampleAndroidChannelIds { horse, highImportance } 5 | 6 | String exampleSmallIcon = 'ic_launcher'; 7 | 8 | // TODO: make into a dropdown 9 | String selectedAndroidChannelId = ExampleAndroidChannelIds.horse.name; 10 | 11 | Map exampleNotifications = { 12 | 'randomId': NotifeeNotification(title: 'randomId'), 13 | 'basic': NotifeeNotification(id: 'basic', title: 'basic', body: 'body'), 14 | 'attachments': NotifeeNotification( 15 | id: 'attachments', 16 | title: 'attachments', 17 | ios: NotificationIOS(attachments: [ 18 | IOSNotificationAttachment( 19 | id: 'attachment-cat', 20 | url: 21 | 'https://icatcare.org/app/uploads/2018/07/Thinking-of-getting-a-cat.png') 22 | ])), 23 | }; 24 | 25 | NotifeeNotification? selectedNotification = exampleNotifications['randomId']; 26 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/test_driver/notifee_e2e.dart: -------------------------------------------------------------------------------- 1 | import 'package:drive/drive.dart' as drive; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:notifee/notifee.dart'; 4 | import 'package:notifee/notifee.dart' as notifee; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | void testsMain() { 8 | // setUpAll(() async { 9 | // }); 10 | group('requestPermission', () { 11 | test( 12 | 'authorizationStatus returns AuthorizationStatus.authorized on Android', 13 | () async { 14 | final result = await notifee.requestPermission(); 15 | expect(result, isA()); 16 | expect(result.authorizationStatus, AuthorizationStatus.authorized); 17 | }, 18 | skip: defaultTargetPlatform != TargetPlatform.android, 19 | ); 20 | }); 21 | 22 | group('getInitialNotification', () { 23 | test('returns null when no initial notification', () async { 24 | expect(await notifee.getInitialNotification(), null); 25 | }); 26 | }); 27 | } 28 | 29 | void main() => drive.main(testsMain); 30 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/test_driver/notifee_e2e_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:drive/drive_driver.dart' as drive; 2 | 3 | void main() => drive.main(); 4 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/web/favicon.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/ephemeral/ 38 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/flutter/packages/notifee/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/ios/Classes/NotifeePlugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021-present Invertase Limited 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | @interface NotifeePlugin : NSObject 9 | @end -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/ios/Classes/NotifeePlugin.m: -------------------------------------------------------------------------------- 1 | #import "NotifeePlugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "notifee-Swift.h" 9 | #endif 10 | 11 | @implementation NotifeePlugin 12 | 13 | + (void)registerWithRegistrar:(NSObject *)registrar { 14 | [NotifeePluginSwift registerWithRegistrar:registrar]; 15 | } 16 | 17 | - (NSString *_Nonnull)flutterChannelName { 18 | return @"plugins.flutter.io/notifee"; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: notifee 2 | description: A feature rich Android & iOS notifications library for Flutter. 3 | version: 0.0.1 4 | homepage: https://github.com/invertase/notifee/tree/main/packages/flutter/packages/notifee 5 | repository: https://github.com/invertase/notifee/tree/main/packages/flutter/packages/notifee 6 | 7 | environment: 8 | sdk: '>=2.12.0 <4.0.0' 9 | flutter: '>=1.17.0' 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | notifee_platform_interface: ^0.0.1 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | flutter_lints: ^1.0.0 20 | mockito: ^5.0.0 21 | plugin_platform_interface: ^2.0.0 22 | test: any 23 | 24 | flutter: 25 | plugin: 26 | platforms: 27 | android: 28 | package: io.flutter.plugins.notifee 29 | pluginClass: NotifeePlugin 30 | ios: 31 | pluginClass: NotifeePlugin 32 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/README.md: -------------------------------------------------------------------------------- 1 | # notifee_platform_interface 2 | 3 | This is the platform implementation interface for [Notifee](https://notifee.app/). 4 | 5 | This plugin is intended for plugin authors only. To use Notifee, see [`notifee`](https://pub.dev/packages/notifee) 6 | on pub.dev. 7 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | # Options configure how source code is generated for every 7 | # `@JsonSerializable`-annotated class in the package. 8 | # 9 | # The default value for each is listed. 10 | any_map: true 11 | checked: false 12 | constructor: "" 13 | create_factory: true 14 | create_to_json: true 15 | disallow_unrecognized_keys: false 16 | explicit_to_json: false 17 | field_rename: none 18 | generic_argument_factories: false 19 | ignore_unannotated: false 20 | include_if_null: true 21 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/method_channel/types.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | import 'package:notifee_platform_interface/notifee_platform_interface.dart'; 19 | 20 | /// Defines a handler for incoming event payloads. 21 | typedef BackgroundEventHandler = Future Function(Event event); 22 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/models/event/event.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | import 'package:notifee_platform_interface/notifee_platform_interface.dart'; 18 | 19 | class Event { 20 | Event({required this.type, required this.detail}); 21 | 22 | EventType type; 23 | EventDetail detail; 24 | 25 | /// Constructs a [Event] from a raw Map. 26 | factory Event.fromMap(Map map) { 27 | return Event( 28 | type: EventType.values[map['type']], 29 | detail: 30 | EventDetail.fromMap(Map.from(map['detail'] as Map)), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/models/event/native_android_channel.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | // TODO: properties 18 | class NativeAndroidChannel { 19 | NativeAndroidChannel(); 20 | 21 | factory NativeAndroidChannel.fromMap(Map map) => 22 | NativeAndroidChannel(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/models/event/native_android_channel_group.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | // TODO: properties 18 | class NativeAndroidChannelGroup { 19 | NativeAndroidChannelGroup(); 20 | 21 | factory NativeAndroidChannelGroup.fromMap(Map map) => 22 | NativeAndroidChannelGroup(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/models/trigger/trigger_type.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | /// Available Trigger Types. 19 | enum TriggerType { timestamp, interval } 20 | 21 | const triggerTypeMap = { 22 | TriggerType.timestamp: 0, 23 | TriggerType.interval: 1, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/models/trigger_notification.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | import 'package:notifee_platform_interface/notifee_platform_interface.dart'; 19 | 20 | class TriggerNotification { 21 | TriggerNotification({required this.notification, required this.trigger}); 22 | 23 | NotifeeNotification notification; 24 | Map trigger; 25 | 26 | factory TriggerNotification.fromMap(Map map) => 27 | TriggerNotification( 28 | notification: NotifeeNotification.fromMap( 29 | Map.from(map['notification'] as Map)), 30 | trigger: Map.from(map['trigger'] as Map)); 31 | } 32 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/lib/src/utils/generate_id.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | import 'dart:math'; 19 | 20 | class GenerateId { 21 | static const int generateIdAlphabet = 20; 22 | 23 | static const String alphabet = 24 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 25 | 26 | static final Random _random = Random(); 27 | 28 | /// Generates a random new Id 29 | static String generateId() { 30 | final StringBuffer stringBuffer = StringBuffer(); 31 | const int maxRandom = alphabet.length; 32 | 33 | for (int i = 0; i < generateIdAlphabet; ++i) { 34 | stringBuffer.write(alphabet[_random.nextInt(maxRandom)]); 35 | } 36 | 37 | return stringBuffer.toString(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/test/models/initial_notification_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:notifee_platform_interface/notifee_platform_interface.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | group('$InitialNotification', () { 6 | test('returns expected values ', () { 7 | final notification = NotifeeNotification(); 8 | final initialNotification = InitialNotification( 9 | notification: notification, pressAction: Null, input: "hello"); 10 | expect(initialNotification.pressAction, Null); 11 | expect(initialNotification.notification.id, notification.id); 12 | expect(initialNotification.input, "hello"); 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/flutter/packages/notifee_platform_interface/test/platform_interface_test/platform_interface_notifee_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:notifee_platform_interface/notifee_platform_interface.dart'; 3 | import 'package:notifee_platform_interface/src/platform_interface/platform_interface_notifee.dart'; 4 | import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 5 | 6 | void main() { 7 | late NotifeePlatform notifeePlatform; 8 | 9 | group('$NotifeePlatform()', () { 10 | setUpAll(() async { 11 | notifeePlatform = NotifeePlatform(); 12 | }); 13 | 14 | test('Constructor', () { 15 | expect(notifeePlatform, isA()); 16 | expect(notifeePlatform, isA()); 17 | }); 18 | 19 | test('throws if getTriggerNotificationIds', () async { 20 | try { 21 | await notifeePlatform.getTriggerNotificationIds(); 22 | } on UnimplementedError catch (e) { 23 | expect(e.message, 24 | equals('getTriggerNotificationIds() is not implemented')); 25 | return; 26 | } 27 | fail('Should have thrown an [UnimplementedError]'); 28 | }); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /packages/flutter/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: notifee_workspace 2 | 3 | environment: 4 | sdk: '>=2.18.0 <4.0.0' 5 | dev_dependencies: 6 | melos: ^3.4.0 7 | -------------------------------------------------------------------------------- /packages/react-native/.eslintignore: -------------------------------------------------------------------------------- 1 | version.ts 2 | dist 3 | node_modules 4 | plugin/build 5 | -------------------------------------------------------------------------------- /packages/react-native/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', // Specifies the ESLint parser 3 | extends: [ 4 | 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin 5 | 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 6 | ], 7 | parserOptions: { 8 | ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features 9 | sourceType: 'module', // Allows for the use of imports 10 | }, 11 | rules: { 12 | camelcase: 'off', 13 | // note you must disable the base rule as it can report incorrect errors 14 | 'no-shadow': 'off', 15 | '@typescript-eslint/no-shadow': ['error'], 16 | '@typescript-eslint/camelcase': 'off', 17 | '@typescript-eslint/no-use-before-define': 'off', 18 | '@typescript-eslint/no-explicit-any': 'off', 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/react-native/.gitattributes: -------------------------------------------------------------------------------- 1 | *.xcodeproj binary 2 | *.xcworkspace binary 3 | *.framework binary 4 | -------------------------------------------------------------------------------- /packages/react-native/.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | dist 3 | node_modules 4 | -------------------------------------------------------------------------------- /packages/react-native/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "trailingComma": "all", 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "bracketSpacing": true, 8 | "bracketSameLine": false, 9 | "tabWidth": 2, 10 | "printWidth": 100 11 | } 12 | -------------------------------------------------------------------------------- /packages/react-native/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /packages/react-native/android/gradle.properties: -------------------------------------------------------------------------------- 1 | NOTIFEE=1 2 | -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.aar -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.aar.md5: -------------------------------------------------------------------------------- 1 | f352cf9592f99de18ac58c980a8044d1 -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha1: -------------------------------------------------------------------------------- 1 | fab0922062b4bb8449ee33b3a21ff4abd728ff5a -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha256: -------------------------------------------------------------------------------- 1 | 8e0fa882e60961a03635ef54c8ed8f5d69031fbcdf659d2ee93434a5ad12994a -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha512: -------------------------------------------------------------------------------- 1 | 4f5fb568dc9c197c6162d1acaa69dbfea44d785785f8aede60fe2c559451558740de092a1adce5cac54cd2f91394c3075667aa3023b8392926afb3a92debb528 -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | app.notifee 6 | core 7 | 202108261754 8 | aar 9 | 10 | -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.pom.md5: -------------------------------------------------------------------------------- 1 | 4f6e0cf891e903f91ee3093356815b7a -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha1: -------------------------------------------------------------------------------- 1 | 692dedb13cd922156e38dc5f6bcfba86e4141932 -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha256: -------------------------------------------------------------------------------- 1 | 4f7ea80d7045abd14e8a836ec3a8299a245994b8bbcff7e30d2e3ae7f523c9ec -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha512: -------------------------------------------------------------------------------- 1 | 79244ae770a7c732e5eb33d72ca3e707398ae33d0db8e104d63690fecdb156d9cc040571f09baab30ffb19db3ac00b0283b74f581c1245069b4bf477c590732b -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/maven-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | app.notifee 4 | core 5 | 6 | 202108261754 7 | 202108261754 8 | 9 | 202108261754 10 | 11 | 20241216022806 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/maven-metadata.xml.md5: -------------------------------------------------------------------------------- 1 | 7d6d188ec6898a9384a27d855c5c34ff -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/maven-metadata.xml.sha1: -------------------------------------------------------------------------------- 1 | adf5ded3af176eee9cd5217cb35530f11fe97746 -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/maven-metadata.xml.sha256: -------------------------------------------------------------------------------- 1 | 555921fbed309173f13d9be3fba19b94d98d01369a7f499562ca2d85c002c144 -------------------------------------------------------------------------------- /packages/react-native/android/libs/app/notifee/core/maven-metadata.xml.sha512: -------------------------------------------------------------------------------- 1 | d1922f758bbaacc1c8801b75b01baedc518ea7463a973d32b4ccf787da5829231963db963f9e7bfa887d97014147630dfdab7c960a113dbc2f35acb88466bb2b -------------------------------------------------------------------------------- /packages/react-native/android/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/react-native/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = '@notifee_react_native' 2 | -------------------------------------------------------------------------------- /packages/react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/react-native/android/src/main/java/io/invertase/notifee/NotifeePackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | package io.invertase.notifee; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import java.util.ArrayList; 12 | import java.util.Collections; 13 | import java.util.List; 14 | import javax.annotation.Nonnull; 15 | 16 | public class NotifeePackage implements ReactPackage { 17 | @Nonnull 18 | @Override 19 | public List createNativeModules(@Nonnull ReactApplicationContext reactContext) { 20 | List modules = new ArrayList<>(); 21 | modules.add(new NotifeeApiModule(reactContext)); 22 | return modules; 23 | } 24 | 25 | @Nonnull 26 | @Override 27 | public List createViewManagers(@Nonnull ReactApplicationContext reactContext) { 28 | return Collections.emptyList(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/react-native/example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /packages/react-native/example/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /packages/react-native/example/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint', 'jest'], 6 | overrides: [ 7 | { 8 | files: ['*.ts', '*.tsx'], 9 | rules: { 10 | '@typescript-eslint/no-shadow': ['error'], 11 | 'no-shadow': 'off', 12 | 'no-undef': 'off', 13 | }, 14 | }, 15 | ], 16 | env: { 17 | 'jest/globals': true, 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /packages/react-native/example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | 35 | # node.js 36 | # 37 | node_modules/ 38 | npm-debug.log 39 | yarn-error.log 40 | 41 | # BUCK 42 | buck-out/ 43 | \.buckd/ 44 | *.keystore 45 | !debug.keystore 46 | 47 | # fastlane 48 | # 49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 50 | # screenshots whenever they are needed. 51 | # For more information about the recommended setup visit: 52 | # https://docs.fastlane.tools/best-practices/source-control/ 53 | 54 | **/fastlane/report.xml 55 | **/fastlane/Preview.html 56 | **/fastlane/screenshots 57 | **/fastlane/test_output 58 | 59 | # Bundle artifact 60 | *.jsbundle 61 | 62 | # Ruby / CocoaPods 63 | /ios/Pods/ 64 | /vendor/bundle/ 65 | -------------------------------------------------------------------------------- /packages/react-native/example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /packages/react-native/example/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.5 2 | -------------------------------------------------------------------------------- /packages/react-native/example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /packages/react-native/example/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '2.7.5' 5 | 6 | gem 'cocoapods', '~> 1.11', '>= 1.11.2' 7 | -------------------------------------------------------------------------------- /packages/react-native/example/__tests__/App.test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | import {render} from '@testing-library/react-native'; 10 | 11 | it('renders correctly', async () => { 12 | const appQueries = render(); 13 | 14 | expect(appQueries.findByText('Test Notifee API Action')).not.toBeNull(); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/react-native/example/_node-version: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/debug.keystore -------------------------------------------------------------------------------- /packages/react-native/example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/java/com/example/CustomActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class CustomActivity extends ReactActivity { 6 | @Override 7 | protected String getMainComponentName() { 8 | return "custom"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java: -------------------------------------------------------------------------------- 1 | package com.example.newarchitecture.components; 2 | 3 | import com.facebook.jni.HybridData; 4 | import com.facebook.proguard.annotations.DoNotStrip; 5 | import com.facebook.react.fabric.ComponentFactory; 6 | import com.facebook.soloader.SoLoader; 7 | 8 | /** 9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a 10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ 11 | * folder for you). 12 | * 13 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 14 | * `newArchEnabled` property). Is ignored otherwise. 15 | */ 16 | @DoNotStrip 17 | public class MainComponentsRegistry { 18 | static { 19 | SoLoader.loadLibrary("fabricjni"); 20 | } 21 | 22 | @DoNotStrip private final HybridData mHybridData; 23 | 24 | @DoNotStrip 25 | private native HybridData initHybrid(ComponentFactory componentFactory); 26 | 27 | @DoNotStrip 28 | private MainComponentsRegistry(ComponentFactory componentFactory) { 29 | mHybridData = initHybrid(componentFactory); 30 | } 31 | 32 | @DoNotStrip 33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) { 34 | return new MainComponentsRegistry(componentFactory); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | # Define the library name here. 4 | project(example_appmodules) 5 | 6 | # This file includes all the necessary to let you build your application with the New Architecture. 7 | include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) 8 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "MainApplicationModuleProvider.h" 2 | 3 | #include 4 | #include 5 | 6 | namespace facebook { 7 | namespace react { 8 | 9 | std::shared_ptr MainApplicationModuleProvider( 10 | const std::string &moduleName, 11 | const JavaTurboModule::InitParams ¶ms) { 12 | // Here you can provide your own module provider for TurboModules coming from 13 | // either your application or from external libraries. The approach to follow 14 | // is similar to the following (for a library called `samplelibrary`: 15 | // 16 | // auto module = samplelibrary_ModuleProvider(moduleName, params); 17 | // if (module != nullptr) { 18 | // return module; 19 | // } 20 | // return rncore_ModuleProvider(moduleName, params); 21 | 22 | // Module providers autolinked by RN CLI 23 | auto rncli_module = rncli_ModuleProvider(moduleName, params); 24 | if (rncli_module != nullptr) { 25 | return rncli_module; 26 | } 27 | 28 | return rncore_ModuleProvider(moduleName, params); 29 | } 30 | 31 | } // namespace react 32 | } // namespace facebook 33 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/jni/MainApplicationModuleProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace facebook { 9 | namespace react { 10 | 11 | std::shared_ptr MainApplicationModuleProvider( 12 | const std::string &moduleName, 13 | const JavaTurboModule::InitParams ¶ms); 14 | 15 | } // namespace react 16 | } // namespace facebook 17 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | namespace facebook { 8 | namespace react { 9 | 10 | class MainApplicationTurboModuleManagerDelegate 11 | : public jni::HybridClass< 12 | MainApplicationTurboModuleManagerDelegate, 13 | TurboModuleManagerDelegate> { 14 | public: 15 | // Adapt it to the package you used for your Java class. 16 | static constexpr auto kJavaDescriptor = 17 | "Lcom/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;"; 18 | 19 | static jni::local_ref initHybrid(jni::alias_ref); 20 | 21 | static void registerNatives(); 22 | 23 | std::shared_ptr getTurboModule( 24 | const std::string &name, 25 | const std::shared_ptr &jsInvoker) override; 26 | std::shared_ptr getTurboModule( 27 | const std::string &name, 28 | const JavaTurboModule::InitParams ¶ms) override; 29 | 30 | /** 31 | * Test-only method. Allows user to verify whether a TurboModule can be 32 | * created by instances of this class. 33 | */ 34 | bool canCreateTurboModule(const std::string &name); 35 | }; 36 | 37 | } // namespace react 38 | } // namespace facebook 39 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/jni/MainComponentsRegistry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace facebook { 9 | namespace react { 10 | 11 | class MainComponentsRegistry 12 | : public facebook::jni::HybridClass { 13 | public: 14 | // Adapt it to the package you used for your Java class. 15 | constexpr static auto kJavaDescriptor = 16 | "Lcom/example/newarchitecture/components/MainComponentsRegistry;"; 17 | 18 | static void registerNatives(); 19 | 20 | MainComponentsRegistry(ComponentFactory *delegate); 21 | 22 | private: 23 | static std::shared_ptr 24 | sharedProviderRegistry(); 25 | 26 | static jni::local_ref initHybrid( 27 | jni::alias_ref, 28 | ComponentFactory *delegate); 29 | }; 30 | 31 | } // namespace react 32 | } // namespace facebook 33 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/jni/OnLoad.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "MainApplicationTurboModuleManagerDelegate.h" 3 | #include "MainComponentsRegistry.h" 4 | 5 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { 6 | return facebook::jni::initialize(vm, [] { 7 | facebook::react::MainApplicationTurboModuleManagerDelegate:: 8 | registerNatives(); 9 | facebook::react::MainComponentsRegistry::registerNatives(); 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | example 3 | 4 | -------------------------------------------------------------------------------- /packages/react-native/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/react-native/example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/packages/react-native/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/react-native/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /packages/react-native/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | 6 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { 7 | include(":ReactAndroid") 8 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') 9 | include(":ReactAndroid:hermes-engine") 10 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') 11 | } 12 | -------------------------------------------------------------------------------- /packages/react-native/example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "displayName": "example" 4 | } -------------------------------------------------------------------------------- /packages/react-native/example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/react-native/example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/_xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | @interface AppDelegate : RCTAppDelegate 4 | @end 5 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | 5 | @implementation AppDelegate 6 | 7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 8 | { 9 | 10 | self.moduleName = @"example"; 11 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 12 | } 13 | 14 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 15 | { 16 | #if DEBUG 17 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 18 | #else 19 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 20 | #endif 21 | } 22 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 23 | /// 24 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 25 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 26 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. 27 | - (BOOL)concurrentRootEnabled 28 | { 29 | return true; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/example/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/react-native/example/ios/exampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/react-native/example/jestSetup.js: -------------------------------------------------------------------------------- 1 | import mock from '@notifee/react-native/jest-mock'; 2 | 3 | // To disable warning Animated: `useNativeDriver` is not supported because the native animated module is missing. 4 | jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); 5 | 6 | jest.mock('@notifee/react-native', () => mock); 7 | -------------------------------------------------------------------------------- /packages/react-native/example/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/react-native/example/src/utils/categories.ts: -------------------------------------------------------------------------------- 1 | import {IOSNotificationCategory} from '@notifee/react-native'; 2 | 3 | export const categories: IOSNotificationCategory[] = [ 4 | { 5 | id: 'quickActions', 6 | actions: [ 7 | { 8 | id: 'first_action_reply', 9 | title: 'Reply, Open & Cancel', 10 | input: true, 11 | }, 12 | { 13 | id: 'second_action_nothing', 14 | title: 'Nothing', 15 | }, 16 | ], 17 | }, 18 | ]; 19 | -------------------------------------------------------------------------------- /packages/react-native/example/tsconfig.json: -------------------------------------------------------------------------------- 1 | // prettier-ignore 2 | { 3 | "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */ 4 | "compilerOptions": { 5 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 6 | 7 | /* Completeness */ 8 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/react-native/ios/RNNotifee.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/react-native/ios/RNNotifee.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/react-native/ios/RNNotifee/NotifeeApiModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present Invertase Limited & Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this library except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | #import 19 | #import 20 | #import 21 | #import "NotifeeCore.h" 22 | 23 | @interface NotifeeApiModule : RCTEventEmitter 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /packages/react-native/react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | dependency: { 3 | platforms: { 4 | android: { 5 | packageImportPath: 'import io.invertase.notifee.NotifeePackage;', 6 | packageInstance: 'new NotifeePackage()', 7 | }, 8 | ios: {}, 9 | }, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/react-native/src/NotifeeJSEventEmitter.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment 6 | // @ts-ignore 7 | import EventEmitter from 'react-native/Libraries/vendor/emitter/EventEmitter'; 8 | 9 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment 10 | // @ts-ignore See https://github.com/facebook/react-native/pull/36462 11 | const emitter = new EventEmitter(); 12 | export default emitter; 13 | -------------------------------------------------------------------------------- /packages/react-native/src/NotifeeNativeModule.web.ts: -------------------------------------------------------------------------------- 1 | import { EventEmitter, NativeEventEmitter, NativeModulesStatic } from 'react-native'; 2 | 3 | export interface NativeModuleConfig { 4 | version: string; 5 | nativeModuleName: string; 6 | nativeEvents: string[]; 7 | } 8 | 9 | export default class NotifeeNativeModule { 10 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment 11 | // @ts-ignore unused value 12 | private readonly _moduleConfig: NativeModuleConfig; 13 | 14 | public constructor(config: NativeModuleConfig) { 15 | this._moduleConfig = Object.assign({}, config); 16 | } 17 | 18 | public get emitter(): EventEmitter { 19 | return new NativeEventEmitter(); 20 | } 21 | 22 | public get native(): NativeModulesStatic { 23 | return {}; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | import NotifeeApiModule from './NotifeeApiModule'; 6 | import { ModuleStatics, ModuleWithStatics } from './types/Module'; 7 | import { version as SDK_VERSION } from './version'; 8 | import { 9 | isIOS, 10 | kReactNativeNotifeeNotificationBackgroundEvent, 11 | kReactNativeNotifeeNotificationEvent, 12 | } from './utils'; 13 | 14 | const apiModule = new NotifeeApiModule({ 15 | version: SDK_VERSION, 16 | nativeModuleName: 'NotifeeApiModule', 17 | nativeEvents: isIOS 18 | ? [kReactNativeNotifeeNotificationEvent, kReactNativeNotifeeNotificationBackgroundEvent] 19 | : [kReactNativeNotifeeNotificationEvent], 20 | }); 21 | 22 | const statics: ModuleStatics = { 23 | SDK_VERSION, 24 | }; 25 | 26 | const defaultExports: ModuleWithStatics = Object.assign(apiModule, statics); 27 | export default defaultExports; 28 | 29 | export * from './types/Library'; 30 | export * from './types/Notification'; 31 | export * from './types/Trigger'; 32 | export * from './types/NotificationIOS'; 33 | export * from './types/NotificationAndroid'; 34 | -------------------------------------------------------------------------------- /packages/react-native/src/types/Library.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | /** 6 | * An Error that has occurred in native Android or iOS code converted into a JavaScript Error. 7 | */ 8 | export interface NativeError extends Error { 9 | /** 10 | * Error code, e.g. `invalid-parameter` 11 | */ 12 | readonly code: string; 13 | 14 | /** 15 | * Error message 16 | */ 17 | readonly message: string; 18 | 19 | /** 20 | * The native returned error code, different per platform 21 | */ 22 | readonly nativeErrorCode: string | number; 23 | 24 | /** 25 | * The native returned error message, different per platform 26 | */ 27 | readonly nativeErrorMessage: string; 28 | } 29 | -------------------------------------------------------------------------------- /packages/react-native/src/types/NotificationWeb.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Empty at the moment but will contain web-specific settings as needed 3 | */ 4 | // eslint-disable-next-line @typescript-eslint/no-empty-interface 5 | export interface WebNotificationSettings {} 6 | -------------------------------------------------------------------------------- /packages/react-native/src/types/PowerManagerInfo.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited. 3 | */ 4 | 5 | /** 6 | * The interface that represents the information returned from `getPowerManagerInfo()`. 7 | * 8 | * View the [Background Restrictions](/react-native/android/background-restrictions) documentation to learn more. 9 | * 10 | * @platform android 11 | */ 12 | export interface PowerManagerInfo { 13 | /** 14 | * The device manufacturer. 15 | * 16 | * For example, Samsung. 17 | */ 18 | manufacturer?: string; 19 | 20 | /** 21 | * The device model. 22 | * 23 | * For example, Galaxy S8 24 | */ 25 | model?: string; 26 | 27 | /** 28 | * The Android version 29 | * 30 | * For example, Android 10 31 | */ 32 | version?: string; 33 | 34 | /** 35 | * The activity that the user will be navigated to if `openPowerManagerSettings()` is called. 36 | * 37 | * Use this as an indicator of what steps the user may have to perform, 38 | * in-order to prevent your app from being killed. 39 | * 40 | * If no activity can be found, value will be null. 41 | */ 42 | activity?: string | null; 43 | } 44 | -------------------------------------------------------------------------------- /packages/react-native/src/utils/id.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | const CHARACTERS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; 6 | 7 | export function generateId(): string { 8 | let newId = ''; 9 | for (let i = 0; i < 20; i++) { 10 | newId += CHARACTERS.charAt(Math.floor(Math.random() * CHARACTERS.length)); 11 | } 12 | return newId; 13 | } 14 | -------------------------------------------------------------------------------- /packages/react-native/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | import { Platform } from 'react-native'; 6 | 7 | export * from './id'; 8 | export * from './validate'; 9 | 10 | export function isError(value: object): boolean { 11 | if (Object.prototype.toString.call(value) === '[object Error]') { 12 | return true; 13 | } 14 | 15 | return value instanceof Error; 16 | } 17 | 18 | export function objectHasProperty( 19 | target: T, 20 | property: string | number | symbol, 21 | ): property is keyof T { 22 | return Object.hasOwnProperty.call(target, property); 23 | } 24 | 25 | export const isIOS = Platform.OS === 'ios'; 26 | 27 | export const isAndroid = Platform.OS === 'android'; 28 | 29 | export const isWeb = Platform.OS === 'web'; 30 | 31 | export function noop(): void { 32 | // noop-🐈 33 | } 34 | export const kReactNativeNotifeeForegroundServiceHeadlessTask = 35 | 'app.notifee.foreground-service-headless-task'; 36 | 37 | export const kReactNativeNotifeeNotificationEvent = 'app.notifee.notification-event'; 38 | 39 | export const kReactNativeNotifeeNotificationBackgroundEvent = 40 | 'app.notifee.notification-event-background'; 41 | 42 | export enum NotificationType { 43 | ALL = 0, 44 | DISPLAYED = 1, 45 | TRIGGER = 2, 46 | } 47 | -------------------------------------------------------------------------------- /packages/react-native/src/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.ts: -------------------------------------------------------------------------------- 1 | import { IOSCommunicationInfoPerson } from '../../types/NotificationIOS'; 2 | import { objectHasProperty, isObject, isString, isUndefined } from '../../utils'; 3 | 4 | export default function validateIOSCommunicationInfoPerson( 5 | person: IOSCommunicationInfoPerson, 6 | ): IOSCommunicationInfoPerson { 7 | if (!isObject(person)) { 8 | throw new Error("'person' expected an object."); 9 | } 10 | 11 | if (!isString(person.id) || person.id.length === 0) { 12 | throw new Error('"person.id" expected a valid string value.'); 13 | } 14 | 15 | if (!isString(person.displayName) || person.displayName.length === 0) { 16 | throw new Error('"person.displayName" expected a valid string value.'); 17 | } 18 | 19 | const out: IOSCommunicationInfoPerson = { 20 | id: person.id, 21 | displayName: person.displayName, 22 | }; 23 | 24 | if (objectHasProperty(person, 'avatar') && !isUndefined(person.avatar)) { 25 | if (!isString(person.avatar)) { 26 | throw new Error('"person.avatar" expected a valid object value.'); 27 | } 28 | 29 | out.avatar = person.avatar; 30 | } 31 | 32 | return out; 33 | } 34 | -------------------------------------------------------------------------------- /packages/react-native/src/validators/validateAndroidChannelGroup.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present Invertase Limited 3 | */ 4 | 5 | import { objectHasProperty, isObject, isString } from '../utils'; 6 | import { AndroidChannelGroup } from '../types/NotificationAndroid'; 7 | 8 | export default function validateAndroidChannelGroup( 9 | group: AndroidChannelGroup, 10 | ): AndroidChannelGroup { 11 | if (!isObject(group)) { 12 | throw new Error("'group' expected an object value."); 13 | } 14 | 15 | /** 16 | * id 17 | */ 18 | if (!isString(group.id) || !group.id) { 19 | throw new Error("'group.id' expected a string value."); 20 | } 21 | 22 | /** 23 | * name 24 | */ 25 | if (!isString(group.name) || !group.name) { 26 | throw new Error("'group.name' expected a string value."); 27 | } 28 | 29 | /** 30 | * Defaults 31 | */ 32 | const out: AndroidChannelGroup = { 33 | id: group.id, 34 | name: group.name, 35 | }; 36 | 37 | /** 38 | * description 39 | */ 40 | if (objectHasProperty(group, 'description')) { 41 | if (!isString(group.description)) { 42 | throw new Error("'group.description' expected a string value."); 43 | } 44 | 45 | out.description = group.description; 46 | } 47 | 48 | return out; 49 | } 50 | -------------------------------------------------------------------------------- /packages/react-native/src/validators/validateIOSInput.ts: -------------------------------------------------------------------------------- 1 | import { IOSInput } from '../types/NotificationIOS'; 2 | import { objectHasProperty, isBoolean, isObject, isString, isUndefined } from '../utils'; 3 | 4 | export default function validateIOSInput(input?: IOSInput): IOSInput { 5 | const out: IOSInput = {}; 6 | 7 | // default value 8 | if (!input) { 9 | return out; 10 | } 11 | 12 | // if true, empty object 13 | if (isBoolean(input)) { 14 | return out; 15 | } 16 | 17 | if (!isObject(input)) { 18 | throw new Error('expected an object value.'); 19 | } 20 | 21 | if (objectHasProperty(input, 'buttonText') && !isUndefined(input.buttonText)) { 22 | if (!isString(input.buttonText)) { 23 | throw new Error("'buttonText' expected a string value."); 24 | } 25 | 26 | out.buttonText = input.buttonText; 27 | } 28 | 29 | if (objectHasProperty(input, 'placeholderText') && !isUndefined(input.placeholderText)) { 30 | if (!isString(input.placeholderText)) { 31 | throw new Error("'placeholderText' expected a string value."); 32 | } 33 | 34 | out.placeholderText = input.placeholderText; 35 | } 36 | 37 | return out; 38 | } 39 | -------------------------------------------------------------------------------- /packages/react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "commonjs", 5 | "lib": ["esnext"], 6 | "allowJs": false, 7 | "jsx": "react-native", 8 | "declaration": true, 9 | "sourceMap": true, 10 | "listEmittedFiles": true, 11 | "outDir": "./dist", 12 | "rootDir": "./src", 13 | "removeComments": false, 14 | "isolatedModules": false, 15 | "strict": true, 16 | "moduleResolution": "node", 17 | "allowSyntheticDefaultImports": true, 18 | "esModuleInterop": true, 19 | "skipLibCheck": true 20 | }, 21 | "exclude": ["node_modules", "./src/__mocks__"], 22 | "include": ["./src"] 23 | } 24 | -------------------------------------------------------------------------------- /tests_react_native/.buckconfig: -------------------------------------------------------------------------------- 1 | [android] 2 | target = android-28 3 | 4 | [download] 5 | max_number_of_retries = 3 6 | 7 | [maven_repositories] 8 | central = https://repo1.maven.org/maven2 9 | google = https://dl.google.com/dl/android/maven2/ 10 | -------------------------------------------------------------------------------- /tests_react_native/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /tests_react_native/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tests_react_native/__tests__/notifeeAppModule.test.ts: -------------------------------------------------------------------------------- 1 | import Notifee from '@notifee/react-native'; 2 | 3 | describe('Notifee App Module', () => { 4 | test('Module is defined on import', () => { 5 | expect(Notifee).toBeDefined(); 6 | }); 7 | test('Version from module package.json matches SDK_VERSION', () => { 8 | // eslint-disable-next-line @typescript-eslint/no-var-requires 9 | const notifeePackageJSON = require('@notifee/react-native/package.json'); 10 | expect(Notifee.SDK_VERSION).toEqual(notifeePackageJSON.version); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /tests_react_native/__tests__/testSetup.ts: -------------------------------------------------------------------------------- 1 | import * as utils from '@notifee/react-native/src/utils'; 2 | 3 | export const setPlatform = (platform: string): void => { 4 | Object.defineProperty(utils, 'isIOS', { value: platform === 'ios' }); 5 | Object.defineProperty(utils, 'isAndroid', { value: platform === 'android' }); 6 | }; 7 | -------------------------------------------------------------------------------- /tests_react_native/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /tests_react_native/android/app/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/keystore.jks -------------------------------------------------------------------------------- /tests_react_native/android/app/src/debug/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Notifee-dev 3 | 4 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/drawable_test-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/drawable_test-web.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/java/com/notifee/testing/FullScreenActivity.java: -------------------------------------------------------------------------------- 1 | package com.notifee.testing; 2 | 3 | import android.os.Bundle; 4 | import com.facebook.react.ReactActivity; 5 | 6 | public class FullScreenActivity extends ReactActivity { 7 | 8 | @Override 9 | protected String getMainComponentName() { 10 | return "full_screen"; 11 | } 12 | 13 | @Override 14 | public void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/mipmap_test-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/mipmap_test-web.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-hdpi/ic_small_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-hdpi/ic_small_icon.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-mdpi/ic_small_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-mdpi/ic_small_icon.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-xhdpi/ic_small_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-xhdpi/ic_small_icon.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-xxhdpi/ic_small_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-xxhdpi/ic_small_icon.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable-xxxhdpi/ic_small_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/drawable-xxxhdpi/ic_small_icon.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable/drawable_test_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/drawable/mipmap_test_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-anydpi-v26/drawable_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-anydpi-v26/drawable_test_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-anydpi-v26/mipmap_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-anydpi-v26/mipmap_test_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/drawable_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/drawable_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/drawable_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/drawable_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/mipmap_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/mipmap_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-hdpi/mipmap_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-hdpi/mipmap_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/drawable_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/drawable_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/drawable_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/drawable_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/mipmap_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/mipmap_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-mdpi/mipmap_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-mdpi/mipmap_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/drawable_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/drawable_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/drawable_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/drawable_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/mipmap_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/mipmap_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xhdpi/mipmap_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xhdpi/mipmap_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/drawable_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/drawable_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/drawable_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/drawable_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/mipmap_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/mipmap_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxhdpi/mipmap_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxhdpi/mipmap_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/drawable_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/drawable_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/drawable_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/drawable_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/mipmap_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/mipmap_test.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/mipmap_test_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/mipmap-xxxhdpi/mipmap_test_round.png -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/raw/hollow.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/raw/hollow.mp3 -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/raw/horse.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/app/src/main/res/raw/horse.mp3 -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/values/drawable_test_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #26A69A 4 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Notifee 3 | 4 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/main/res/xml/remote_config_resource_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | company 5 | invertase 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_react_native/android/app/src/staging/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Notifee-staging 3 | 4 | -------------------------------------------------------------------------------- /tests_react_native/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | org.gradle.caching=true 3 | org.gradle.parallel=true 4 | org.gradle.configureondemand=true 5 | org.gradle.jvmargs=-Xmx3g 6 | android.useAndroidX=true 7 | 8 | FLIPPER_VERSION=0.125.0 9 | # Use this property to specify which architecture you want to build. 10 | # You can also override it from the CLI using 11 | # ./gradlew -PreactNativeArchitectures=x86_64 12 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 13 | # Use this property to enable support to the new architecture. 14 | # This will allow you to use TurboModules and the Fabric render in 15 | # your application. You should enable this flag either if you want 16 | # to write custom TurboModules/Fabric components OR use libraries that 17 | # are providing them. 18 | newArchEnabled=false -------------------------------------------------------------------------------- /tests_react_native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /tests_react_native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /tests_react_native/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /tests_react_native/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /tests_react_native/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = '@notifee_tests' 2 | 3 | include ':notifee_core' 4 | project(':notifee_core').projectDir = new File(rootProject.projectDir, '../../android') 5 | 6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 7 | include ':app' 8 | includeBuild('../node_modules/react-native-gradle-plugin') 9 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { 10 | include(":ReactAndroid") 11 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') 12 | include(":ReactAndroid:hermes-engine") 13 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') 14 | } -------------------------------------------------------------------------------- /tests_react_native/assets/horse.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/assets/horse.mp3 -------------------------------------------------------------------------------- /tests_react_native/assets/notifee-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/assets/notifee-logo.png -------------------------------------------------------------------------------- /tests_react_native/assets/notifee_logo_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/assets/notifee_logo_full.png -------------------------------------------------------------------------------- /tests_react_native/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /tests_react_native/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import '@react-native-firebase/messaging'; 3 | import firebase from '@react-native-firebase/app'; 4 | import notifee from '@notifee/react-native'; 5 | 6 | import App from './example/app'; 7 | 8 | firebase.messaging().setBackgroundMessageHandler(async message => { 9 | console.log('onBackgroundMessage New FCM Message', message); 10 | }); 11 | 12 | notifee.onBackgroundEvent(async event => { 13 | console.log('notifee.onBackgroundEvent triggered: ' + JSON.stringify(event)); 14 | }); 15 | 16 | AppRegistry.registerComponent('testing', () => App); 17 | -------------------------------------------------------------------------------- /tests_react_native/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { AppRegistry } from 'react-native'; 3 | import { Tester, TestHookStore } from 'cavy'; 4 | import NativeReporter from 'cavy-native-reporter'; 5 | 6 | import App from './example/app'; 7 | import { NotificationSpec } from './specs/notification.spec'; 8 | import { ApiSpec } from './specs/api.spec'; 9 | 10 | const testHookStore = new TestHookStore(); 11 | 12 | function TestApp() { 13 | return ( 14 | 19 | 20 | 21 | ); 22 | } 23 | 24 | AppRegistry.registerComponent('testing', () => TestApp); 25 | -------------------------------------------------------------------------------- /tests_react_native/ios/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /tests_react_native/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | # NODE_BINARY variable contains the PATH to the node executable. 6 | # 7 | # Customize the NODE_BINARY variable here. 8 | # For example, to use nvm with brew, add the following line 9 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 10 | export NODE_BINARY=$(command -v node) -------------------------------------------------------------------------------- /tests_react_native/ios/NotifeeContentExtension/NotificationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationViewController.h 3 | // NotifeeContentExtension 4 | // 5 | // Created by Mike on 07/02/2020. 6 | // Copyright © 2020 Invertase. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NotificationViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /tests_react_native/ios/NotifeeTestingNSE/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | NotifeeTestingNSE 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionPointIdentifier 26 | com.apple.usernotifications.service 27 | NSExtensionPrincipalClass 28 | NotificationService 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests_react_native/ios/NotifeeTestingNSE/NotificationService.h: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationService.h 3 | // NotifeeTestingNSE 4 | // 5 | // Created by Helena Ford on 21/08/2021. 6 | // Copyright © 2021 Invertase. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NotificationService : UNNotificationServiceExtension 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property(nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-1024.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-20@2x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-20@3x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-29@2x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-29@3x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-40@2x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-40@3x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-60@2x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/Images.xcassets/AppIcon.appiconset/notifee-logo-60@3x.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/NotifeeRelease.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.associated-domains 8 | 9 | applinks:reactnativefirebase.page.link 10 | 11 | com.apple.developer.usernotifications.communication 12 | 13 | keychain-access-groups 14 | 15 | $(AppIdentifierPrefix)com.invertase.testing 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | @autoreleasepool { 17 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests_react_native/ios/testing/media/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/media/cat.png -------------------------------------------------------------------------------- /tests_react_native/ios/testing/media/dog.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/media/dog.mp4 -------------------------------------------------------------------------------- /tests_react_native/ios/testing/media/kick.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/ios/testing/media/kick.wav -------------------------------------------------------------------------------- /tests_react_native/ios/testing/testing.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.associated-domains 8 | 9 | applinks:reactnativefirebase.page.link 10 | 11 | com.apple.developer.usernotifications.communication 12 | 13 | keychain-access-groups 14 | 15 | $(AppIdentifierPrefix)com.notifee.testing 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests_react_native/ios/testingTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests_react_native/jest-mock.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | jest.mock('react-native', () => { 4 | const RN = jest.requireActual('react-native'); 5 | 6 | RN.NativeModules.NotifeeApiModule = { 7 | addListener: () => jest.fn(), 8 | }; 9 | 10 | RN.Platform = jest.fn().mockImplementation(() => ({ 11 | ...RN.Platform, 12 | OS: 'android', 13 | Version: 123, 14 | })); 15 | return RN; 16 | }); 17 | -------------------------------------------------------------------------------- /tests_react_native/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | maxConcurrency: 30, 3 | preset: './tests_react_native/node_modules/react-native/jest-preset.js', 4 | transform: { 5 | '^.+\\.(js)$': 'babel-jest', 6 | '\\.(ts|tsx)$': 'ts-jest', 7 | }, 8 | rootDir: '..', 9 | testMatch: [ 10 | '/tests_react_native/__tests__/**/*.test.ts', 11 | '/packages/react-native/plugin/__tests__/**/*.test.ts', 12 | ], 13 | modulePaths: ['node_modules', '/tests_react_native/node_modules'], 14 | collectCoverage: true, 15 | 16 | collectCoverageFrom: [ 17 | '/packages/react-native/src/**/*.{ts,tsx}', 18 | '/packages/react-native/plugin/**/*.{ts,tsx}', 19 | '!**/node_modules/**', 20 | '!**/vendor/**', 21 | ], 22 | 23 | setupFilesAfterEnv: ['/tests_react_native/jest-mock.js'], 24 | 25 | moduleFileExtensions: ['ts', 'tsx', 'js'], 26 | }; 27 | -------------------------------------------------------------------------------- /tests_react_native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@notifee/tests-react-native", 3 | "version": "0.2.3", 4 | "private": true, 5 | "scripts": { 6 | "build:clean": "rimraf dist && rimraf android/build && rimraf android/app/build && rimraf android/.gradle && rimraf ios/build", 7 | "prepare": "patch-package || true", 8 | "send-pn": "node ./sendPushNotification.js" 9 | }, 10 | "dependencies": { 11 | "@notifee/react-native": "*", 12 | "@react-native-firebase/app": "^14.5.1", 13 | "@react-native-firebase/messaging": "^14.5.1", 14 | "cross-env": "^7.0.2", 15 | "prop-types": "^15.8.1", 16 | "react": "^18.0.0", 17 | "react-native": "0.69.12" 18 | }, 19 | "devDependencies": { 20 | "@babel/core": "^7.17.5", 21 | "@babel/preset-env": "^7.16.11", 22 | "@react-native-community/cli": "^7.0.3", 23 | "@types/cavy": "^3.2.4", 24 | "@types/chai": "^4.3.0", 25 | "@types/jest": "^27.4.1", 26 | "@types/react-native": "^0.70", 27 | "a2a": "^0.2.0", 28 | "babel-jest": "^27.5.1", 29 | "cavy": "^4.0.2", 30 | "cavy-native-reporter": "^0.1.3", 31 | "chai": "^4.3.6", 32 | "jest": "^27.5.1", 33 | "metro-react-native-babel-preset": "^0.70.3", 34 | "patch-package": "^6.4.7", 35 | "ts-jest": "^27.1.3", 36 | "typescript": "^4.6.2", 37 | "firebase-admin": "^10.2.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests_react_native/patches/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/invertase/notifee/b73c76d7fd939b86ceed9c0450b0782e95ea7656/tests_react_native/patches/.gitkeep -------------------------------------------------------------------------------- /tsconfig.docs.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "packages/react-native/src/types/**/*.ts" 4 | ], 5 | "compilerOptions": { 6 | "noEmit": true, 7 | "target": "es5", 8 | "module": "commonjs", 9 | "declaration": true, 10 | "importHelpers": true, 11 | "jsx": "react", 12 | "sourceMap": true, 13 | "strict": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "moduleResolution": "node", 19 | "skipLibCheck": true, 20 | "experimentalDecorators": true, 21 | "emitDecoratorMetadata": true, 22 | "lib": ["es2015", "es2016", "esnext", "dom"] 23 | }, 24 | "exclude": ["node_modules", "**/*.spec.ts"] 25 | } 26 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "packages/react-native/src/**/*.ts", 4 | "tests_react_native/__tests__", 5 | "tests_react_native/example" 6 | ], 7 | "compilerOptions": { 8 | "noEmit": true, 9 | "allowJs": true, 10 | "target": "es6", 11 | "isolatedModules": true, 12 | "module": "commonjs", 13 | "declaration": true, 14 | "importHelpers": true, 15 | "jsx": "react", 16 | "sourceMap": true, 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noImplicitReturns": true, 21 | "preserveConstEnums": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "moduleResolution": "node", 24 | "skipLibCheck": true, 25 | "esModuleInterop": true, 26 | "allowSyntheticDefaultImports": true, 27 | "lib": [ 28 | "es6" 29 | ] 30 | }, 31 | "exclude": [ 32 | "node_modules", 33 | "babel.config.js", 34 | "metro.config.js", 35 | "tests_react_native/jest.config.js", 36 | ] 37 | } --------------------------------------------------------------------------------