diff --git a/en/react-native-push-notification.md b/en/react-native-push-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..cd148669243cd3ff3a23f9ce501e6a98b086c045 --- /dev/null +++ b/en/react-native-push-notification.md @@ -0,0 +1,322 @@ +# React Native Push Notification + +A React Native push notification library designed for the OpenHarmonyOS platform, providing comprehensive notification management functionality. + +## Download and Usage + +### npm + +```bash +npm install @react-native-oh-tpl/react-native-push-notification +``` + +### yarn + +```bash +yarn add @react-native-oh-tpl/react-native-push-notification +``` + +The following code demonstrates the basic usage scenario of this library: + +When using it, the imported library name remains the same. + +```jsx +import PushNotification from '@react-native-oh-tpl/react-native-push-notification'; + + const sendBasicNotification = async () => { + try { + if (!PushNotification) { + showAlert('Error', 'PushNotification module unavailable'); + return; + } + const options = { + title: 'This is a regular message', + text: 'This is the content of the regular message', + id: Date.now(), + notificationType: NotificationType.TEXT, + isFloatingIcon: true, + sound: 'rawfile/sound.mp3', + notificationSlotType: SlotType.SOCIAL_COMMUNICATION, + }; + + const id = await PushNotification.localNotification(JSON.stringify(options)); + if (id !== undefined) { + console.info(`Basic notification sent with id: ${id}`); + showAlert('Success', `Notification sent, ID: ${id}`); + } else { + console.error('Send basic notification failed'); + showAlert('Failed', 'Sending notification failed'); + } + } catch (error) { + console.error('Send basic notification failed:', error); + showAlert('Exception', `Sending notification exception: ${error}`); + } + }; +``` + +#### ## Link + +| | Autolink Support | RN Framework Version | +| -------------------------- | ------------ | ------ | +| ~8.7.0 | No | 0.77 | +| ~8.6.4 | Yes | 0.72 | +| <= 8.6.3-0.4.17@deprecated | No | 0.72 | + +Projects using AutoLink need to be configured according to this document. Autolink framework guide: [https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/en/Autolinking.md](https://gitee.com/link?target=https%3A%2F%2Fgitcode.com%2Fopenharmony-sig%2Fohos_react_native%2Fblob%2Fmaster%2Fdocs%2Fen%2FAutolinking.md) +Projects using AutoLink need to be configured according to this document. Autolink framework guide: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/en/Autolinking.md + +If your version supports Autolink and the project has already integrated Autolink, you can skip the ManualLink configuration. + +
+ ManualLink: This step is guidance for manually configuring native dependencies + +First, you need to open the HarmonyOS project `harmony` in DevEco Studio. + +### 1. Add overrides field to `oh-package.json5` in the project root directory + +```json +{ + ... + "overrides": { + "@rnoh/react-native-openharmony" : "./react_native_openharmony" + } +} +``` + +### 2. Introduce native code + +There are currently two methods: + +1. Import via har package (this method will be deprecated after IDE完善相关功能, currently preferred method); +2. Directly link source code. + +Method 1: Import via har package (recommended) + +> [!TIP] har packages are located in the `harmony` folder of the third-party library installation path. + +Open `entry/oh-package.json5`, add the following dependencies: + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-fast-image": "file:../../node_modules/@react-native-oh-tpl/react-native-push-notification/harmony/push_notification.har" + } +``` + +Click the `sync` button in the upper right corner + +Or execute in the terminal: + +```bash +cd entry +ohpm install +``` + +Method 2: Directly link source code + +To use direct source code linking, please refer to [Direct Source Code Linking Instructions](/en/link-source-code.md) + +### 3. Configure CMakeLists and introduce PushNotificationPackage + +> If using <= 8.6.3-0.4.17 version, please skip this chapter. + +Open `entry/src/main/cpp/CMakeLists.txt`, add: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-push-notification/src/main/cpp" ./fast-image) +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_push_notification) +# RNOH_END: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp`, add: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "RTNPushNotificationPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 4. Introduce PushNotificationPackage on the ArkTs side + +Open `entry/src/main/ets/RNPackagesFactory.ts`, add: + +```diff + ... ++ import {PushNotificationPackage} from '@react-native-oh-tpl/react-native-push-notification/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new FastImagePackage(ctx) + ]; +} +``` + +
+ +#### Run + +Click the `sync` button in the upper right corner + +Or execute in the terminal: + +```bash +cd entry + +ohpm install +``` + +Then compile and run. + +## Constraints and Limitations + +### Compatibility + +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use compatible DevEco Studio and phone ROM. + +Validated on the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; + +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; + +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; + +## Properties + +### NotificationOptions + +- `id`: Notification ID +- `showDeliveryTime`: Whether to show delivery time +- `tapDismissed`: Whether notification is automatically cleared +- `autoDeletedTime`: Time for automatic clearing +- `wantAgent`: WantAgent encapsulates the app's behavioral intentions, triggered when notification is clicked +- `extraInfo`: Extended parameters +- `isAlertOnce`: Set whether there is only one notification reminder +- `isStopwatch`: Whether to show elapsed time +- `isCountDown`: Whether to show countdown time +- `isFloatingIcon`: Whether to show status bar icon +- `label`: Notification label +- `smallIcon`: Small icon (Base64 encoded or resource path) +- `largeIcon`: Large icon (Base64 encoded or resource path) +- `lockscreenPicture`: Picture displayed on lock screen +- `notificationType`: Notification type (TEXT, LONGTEXT, LINES, PICTURE, PROGRESS) +- `title`: Notification title +- `text`: Notification content +- `additionalText`: Notification additional content +- `briefText`: Summary content of notification +- `longText`: Long text of notification +- `expandedTitle`: Title when notification expands +- `picture`: Picture for picture notification (Base64 encoded or resource path) +- `fileName`: Download file name (progress bar notification) +- `progressValue`: Download progress (progress bar notification) +- `fireDate`: Scheduled notification trigger time +- `actionButtons`: Array of notification buttons +- `groupName`: Group notification name +- `notificationSlotType`: Notification channel type +- `repeatType`: Repeat type (minute, hour, day, week, month, time) +- `repeatTime`: Repeat interval time +- `repeatInterval`: Repeat interval (milliseconds) +- `repeatCount`: Number of repeats (-1 means infinite repeat) + +### NotificationType Enum + +- `TEXT`: Basic text notification +- `LONGTEXT`: Long text notification +- `LINES`: Multi-line text notification +- `PICTURE`: Picture notification +- `PROGRESS`: Progress bar notification + +### SlotType Enum + +- `UNKNOWN_TYPE`: Unknown type +- `SOCIAL_COMMUNICATION`: Social communication +- `SERVICE_INFORMATION`: Service information +- `CONTENT_INFORMATION`: Content information +- `LIVE_VIEW`: Live viewing +- `CUSTOMER_SERVICE`: Customer service +- `OTHER_TYPES`: Other types + +### SlotLevel Enum + +- `LEVEL_NONE`: No level +- `LEVEL_MIN`: Minimum level +- `LEVEL_LOW`: Low level +- `LEVEL_DEFAULT`: Default level +- `LEVEL_HIGH`: High level + +## Static Methods + +| Method Name | Description | Parameters | +| --------------------------------------- | ----------------------- | --------------------------------------------------- | +| configure | Configure push notification service | options: (config: string) => void | +| localNotification | Send local notification | details: string | +| cancelLocalNotification | Cancel local notification with specified ID | notificationId: number | +| cancelAllLocalNotifications | Cancel all local notifications | None | +| setApplicationIconBadgeNumber | Set application icon badge number | number: number | +| getApplicationIconBadgeNumber | Get application icon badge number | None | +| clearBadge | Clear badge | None | +| clearAllNotifications | Clear all notifications | None | +| removeAllDeliveredNotifications | Remove all delivered notifications | None | +| getDeliveredNotifications | Get list of delivered notifications | None | +| getScheduledLocalNotifications | Get scheduled local notifications | None | +| removeDeliveredNotifications | Remove delivered notification with specified ID | id: number | +| getChannels | Get list of notification channels | None | +| channelExists | Check if specified type channel exists | notificationType: SlotType | +| createChannel | Create notification channel | channelType: SlotType | +| channelBlocked | Check if specified type channel is blocked | channelType: SlotType | +| deleteChannel | Delete notification channel | type: SlotType | +| requestPermissions | Request notification permissions | None | +| checkPermissions | Check notification permissions status | None | +| openNotifictionSetting | Open notification settings page | None | +| unregister | Unregister push service | None | +| isConfigured | Check if configured | None | +| popInitialNotification | Pop initial notification | want: Object | +| createWantAgent | Create WantAgent | notificationId: number, actionType?: string | +| registerActionButton | Register notification button action | actionId: string, action: () => void | +| getPushToken | Get push token | None | + +## License + +This project is based on [The MIT License (MIT)](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2FDylanVann%2Freact-native-fast-image%2Fblob%2Fmain%2FLICENSE). Feel free to enjoy and participate in the open source. \ No newline at end of file diff --git a/zh-cn/react-native-push-notification.md b/zh-cn/react-native-push-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..2f0fc255a619f84d08766e31482315f801fa1f09 --- /dev/null +++ b/zh-cn/react-native-push-notification.md @@ -0,0 +1,322 @@ +# React Native Push Notification + + React Native 推送通知库,提供全面的通知管理功能。 + +## 下载和使用 + +### npm + +```bash +npm install @react-native-oh-tpl/react-native-push-notification +``` + +### yarn + +```bash +yarn add @react-native-oh-tpl/react-native-push-notification +``` + +下面的代码展示了这个库的基本使用场景: + +使用时 import 的库名不变。 + +```jsx +import PushNotification from '@react-native-oh-tpl/react-native-push-notification'; + + const sendBasicNotification = async () => { + try { + if (!PushNotification) { + showAlert('错误', 'PushNotification模块不可用'); + return; + } + const options = { + title: '这是一条普通消息', + text: '这是普通消息的内容', + id: Date.now(), + notificationType: NotificationType.TEXT, + isFloatingIcon: true, + sound: 'rawfile/sound.mp3', + notificationSlotType: SlotType.SOCIAL_COMMUNICATION, + }; + + const id = await PushNotification.localNotification(JSON.stringify(options)); + if (id !== undefined) { + console.info(`Basic notification sent with id: ${id}`); + showAlert('成功', `通知已发送,ID: ${id}`); + } else { + console.error('Send basic notification failed'); + showAlert('失败', '发送通知失败'); + } + } catch (error) { + console.error('Send basic notification failed:', error); + showAlert('异常', `发送通知异常: ${error}`); + } + }; +``` + +#### ## Link + +| | 是否支持autolink | RN框架版本 | +| -------------------------- | ------------ | ------ | +| ~8.7.0 | No | 0.77 | +| ~8.6.4 | Yes | 0.72 | +| <= 8.6.3-0.4.17@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:[https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md](https://gitee.com/link?target=https%3A%2F%2Fgitcode.com%2Fopenharmony-sig%2Fohos_react_native%2Fblob%2Fmaster%2Fdocs%2Fzh-cn%2FAutolinking.md) +使用 AutoLink 的工程需要根据该文档配置,Autolink 框架指导文档: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 + +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 + +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 + +### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 + +```json +{ + ... + "overrides": { + "@rnoh/react-native-openharmony" : "./react_native_openharmony" + } +} +``` + +### 2.引入原生端代码 + +目前有两种方法: + +1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); +2. 直接链接源码。 + +方法一:通过 har 包引入(推荐) + +> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 + +打开 `entry/oh-package.json5`,添加以下依赖 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-fast-image": "file:../../node_modules/@react-native-oh-tpl/react-native-push-notification/harmony/push_notification.har" + } +``` + +点击右上角的 `sync` 按钮 + +或者在终端执行: + +```bash +cd entry +ohpm install +``` + +方法二:直接链接源码 + +如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) + +### 3.配置 CMakeLists 和引入 PushNotificationPackage + +> 若使用的是 <= 8.6.3-0.4.17 版本,请跳过本章。 + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-push-notification/src/main/cpp" ./fast-image) +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_push_notification) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "RTNPushNotificationPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 4.在 ArkTs 侧引入 PushNotificationPackage + +打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: + +```diff + ... ++ import {PushNotificationPackage} from '@react-native-oh-tpl/react-native-push-notification/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new FastImagePackage(ctx) + ]; +} +``` + +
+ +#### 运行 + +点击右上角的 `sync` 按钮 + +或者在终端执行: + +```bash +cd entry + +ohpm install +``` + +然后编译、运行即可。 + +## 约束与限制 + +### 兼容性 + +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; + +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; + +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; + +## 属性 + +### NotificationOptions + +- `id`: 通知ID +- `showDeliveryTime`: 是否显示分发时间 +- `tapDismissed`: 通知是否自动清除 +- `autoDeletedTime`: 自动清除的时间 +- `wantAgent`: WantAgent封装了应用的行为意图,点击通知时触发该行为 +- `extraInfo`: 扩展参数 +- `isAlertOnce`: 设置是否仅有一次此通知提醒 +- `isStopwatch`: 是否显示已用时间 +- `isCountDown`: 是否显示倒计时时间 +- `isFloatingIcon`: 是否显示状态栏图标 +- `label`: 通知标签 +- `smallIcon`: 小图标(Base64编码或资源路径) +- `largeIcon`: 大图标(Base64编码或资源路径) +- `lockscreenPicture`: 锁屏界面显示的图片 +- `notificationType`: 通知类型(TEXT, LONGTEXT, LINES, PICTURE, PROGRESS) +- `title`: 通知标题 +- `text`: 通知内容 +- `additionalText`: 通知附加内容 +- `briefText`: 通知概要内容 +- `longText`: 通知的长文本 +- `expandedTitle`: 通知展开时的标题 +- `picture`: 图片通知的图片(Base64编码或资源路径) +- `fileName`: 下载文件名(进度条通知) +- `progressValue`: 下载进度(进度条通知) +- `fireDate`: 计划通知触发时间 +- `actionButtons`: 通知按钮数组 +- `groupName`: 组通知名称 +- `notificationSlotType`: 通知渠道类型 +- `repeatType`: 重复类型(minute, hour, day, week, month, time) +- `repeatTime`: 重复间隔时间 +- `repeatInterval`: 重复间隔(毫秒) +- `repeatCount`: 重复次数(-1表示无限重复) + +### NotificationType 枚举 + +- `TEXT`: 基本文本通知 +- `LONGTEXT`: 长文本通知 +- `LINES`: 多行文本通知 +- `PICTURE`: 图片通知 +- `PROGRESS`: 进度条通知 + +### SlotType 枚举 + +- `UNKNOWN_TYPE`: 未知类型 +- `SOCIAL_COMMUNICATION`: 社交通讯 +- `SERVICE_INFORMATION`: 服务信息 +- `CONTENT_INFORMATION`: 内容信息 +- `LIVE_VIEW`: 直播观看 +- `CUSTOMER_SERVICE`: 客户服务 +- `OTHER_TYPES`: 其他类型 + +### SlotLevel 枚举 + +- `LEVEL_NONE`: 无级别 +- `LEVEL_MIN`: 最低级别 +- `LEVEL_LOW`: 低级别 +- `LEVEL_DEFAULT`: 默认级别 +- `LEVEL_HIGH`: 高级别 + +## 静态方法 + +| 方法名 | 描述 | 参数 | +| ------------------------------- | -------------- | ------------------------------------------- | +| configure | 配置推送通知服务 | options: (config: string) => void | +| localNotification | 发送本地通知 | details: string | +| cancelLocalNotification | 取消指定ID的本地通知 | notificationId: number | +| cancelAllLocalNotifications | 取消所有本地通知 | 无 | +| setApplicationIconBadgeNumber | 设置应用图标徽章数字 | number: number | +| getApplicationIconBadgeNumber | 获取应用图标徽章数字 | 无 | +| clearBadge | 清除徽章 | 无 | +| clearAllNotifications | 清除所有通知 | 无 | +| removeAllDeliveredNotifications | 移除所有已送达的通知 | 无 | +| getDeliveredNotifications | 获取已送达的通知列表 | 无 | +| getScheduledLocalNotifications | 获取计划中的本地通知 | 无 | +| removeDeliveredNotifications | 移除指定ID的已送达通知 | id: number | +| getChannels | 获取通知渠道列表 | 无 | +| channelExists | 检查指定类型的渠道是否存在 | notificationType: SlotType | +| createChannel | 创建通知渠道 | channelType: SlotType | +| channelBlocked | 检查指定类型的渠道是否被阻止 | channelType: SlotType | +| deleteChannel | 删除通知渠道 | type: SlotType | +| requestPermissions | 请求通知权限 | 无 | +| checkPermissions | 检查通知权限状态 | 无 | +| openNotifictionSetting | 打开通知设置页面 | 无 | +| unregister | 注销推送服务 | 无 | +| isConfigured | 检查是否已配置 | 无 | +| popInitialNotification | 弹出初始通知 | want: Object | +| createWantAgent | 创建WantAgent | notificationId: number, actionType?: string | +| registerActionButton | 注册通知按钮动作 | actionId: string, action: () => void | +| getPushToken | 获取推送令牌 | 无 | + +## 开源协议 + +本项目基于 [The MIT License (MIT)](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2FDylanVann%2Freact-native-fast-image%2Fblob%2Fmain%2FLICENSE) ,请自由地享受和参与开源。 \ No newline at end of file