From b69ef87bfc67d6b764c3e42083d6a9b41671fc63 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:05:06 +0800 Subject: [PATCH 1/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-base64=E5=BA=93=E4=B8=ADGitHub=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=EF=BC=8C=E4=BB=A5=E5=8F=8A=E7=A4=BA=E4=BE=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=AD=E5=AD=98=E5=9C=A8=E4=B8=AD=E6=96=87=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-base64.md | 2 +- zh-cn/react-native-base64.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/en/react-native-base64.md b/en/react-native-base64.md index 05f8e505..36bac2f4 100644 --- a/en/react-native-base64.md +++ b/en/react-native-base64.md @@ -12,7 +12,7 @@

-> [!TIP] [GitHub address](https://github.com/eranbo/react-native-base64) +> [!TIP] [GitHub address](https://github.com/eranbo/react-native-base64/releases/tag/0.2.1) ## Installation and Usage diff --git a/zh-cn/react-native-base64.md b/zh-cn/react-native-base64.md index 31dbd335..6896da51 100644 --- a/zh-cn/react-native-base64.md +++ b/zh-cn/react-native-base64.md @@ -12,7 +12,7 @@

-> [!TIP] [Github 地址](https://github.com/eranbo/react-native-base64) +> [!TIP] [Github 地址](https://github.com/eranbo/react-native-base64/releases/tag/0.2.1) ## 安装与使用 @@ -59,7 +59,7 @@ export function Base64Page(): JSX.Element { const [word, setWord] = useState('react native'); const encodeWord = base64.encode(word); const decodeWord = base64.decode(encodeWord); - const wordEqualDecodeWord = `word equal decode word: ${word === decodeWord}`; + const wordEqualDecodeWord = `word equal decode word: ${word === decodeWord}`; const byteArrayWord = Uint8Array.from(word.split(''), w => w.charCodeAt(0)); const encodeWordFromByteArray = base64.encodeFromByteArray(byteArrayWord); const decodeFromByteArray = base64.decode(encodeWordFromByteArray); -- Gitee From 665982b27b21d3e0421cc6ad12233f66c8b6d21e Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:08:51 +0800 Subject: [PATCH 2/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-ble-manager=E7=9A=84=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BB=A5=E5=8F=8A=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=AD=E7=9A=84=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-ble-manager.md | 40 +++++++++++++++---------------- zh-cn/react-native-ble-manager.md | 8 +++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/en/react-native-ble-manager.md b/en/react-native-ble-manager.md index 198bd69e..091ba517 100644 --- a/en/react-native-ble-manager.md +++ b/en/react-native-ble-manager.md @@ -45,7 +45,7 @@ The following code shows the basic use scenario of the repository: ```js import React, { useState, useEffect } from 'react'; -import { ScrollView, StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; +import { StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; import ReactNativeBleManager from 'react-native-ble-manager'; import { Peripheral } from 'react-native-ble-manager'; import { Colors } from 'react-native/Libraries/NewAppScreen'; @@ -185,21 +185,21 @@ export default function BleManagerDemo() { @@ -456,7 +456,7 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -> [!TIP] 因本库需要两台手机去进行对端扫描和连接,所以两台手机各装一个 har 包编译(`ble_managerGatt.har` 和 `ble_managerServers.har`) +> [!TIP] This library requires two mobile phones to scan and connect to the peer end. Therefore, a .har file (`ble_managerGatt.har` and `ble_managerServers.har`) needs to be installed on each of the two mobile phones for compilation. the first mobile phone: `ble_managerGatt.har` @@ -529,9 +529,9 @@ Check the release version information in the release address of the third-party ### Permission Requirements -- 由于此库涉及蓝牙系统控制功能,使用对应接口时则需要配置对应的权限,权限需配置在 entry/src/main 目录下 module.json5 文件中。其中部分权限需弹窗向用户申请授权。具体权限配置见文档:[程序访问控制](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/en/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 +- This library involves the Bluetooth system control function. Therefore, you need to configure the corresponding permission in the **module.json5** file in the **entry/src/main** directory when using the corresponding APIs. Some permissions need to be requested from users in a pop-up window. For details about the permission configuration, see [Application Access Control](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/en/application-dev/security/AccessToken/app-permission-mgmt-overview.md). -- 此库部分功能与接口需要 normal 权限:ohos.permission.ACCESS_BLUETOOTH。 +- Some functions and APIs of this library require the **normal** permission **ohos.permission.ACCESS_BLUETOOTH**. ## API @@ -579,19 +579,19 @@ Check the release version information in the release address of the third-party ## Known Issues -- [ ] refreshCache 用于清理和刷新蓝牙设备缓存的一部分 [issue#3](https://github.com/react-native-oh-library/react-native-ble-manager/issues/3) -- [ ] requestConnectionPriority 用于请求蓝牙连接优先级 [issue#4](https://github.com/react-native-oh-library/react-native-ble-manager/issues/4) -- [ ] startNotificationUseBuffer 用来启动一个带缓冲区的通知服务 [issue#6](https://github.com/react-native-oh-library/react-native-ble-manager/issues/6) -- [ ] CompanionScan 扫描配套设备[issue#5](https://github.com/react-native-oh-library/react-native-ble-manager/issues/5) -- [ ] getAssociatedPeripherals 检索相关外围设备(从配套管理器) [issue#7](https://github.com/react-native-oh-library/react-native-ble-manager/issues/7) -- [ ] removeAssociatedPeripheral 移除相关外围设备 [issue#8](https://github.com/react-native-oh-library/react-native-ble-manager/issues/8) -- [ ] setName 创建设置蓝牙适配器名称 [issue#9](https://github.com/react-native-oh-library/react-native-ble-manager/issues/9) -- [ ] supportsCompanion 检查当前设备是否支持配套设备管理器 [issue#10](https://github.com/react-native-oh-library/react-native-ble-manager/issues/10) -- [ ] stopNotification 停止指定特征的通知 [issue#11](https://github.com/react-native-oh-library/react-native-ble-manager/issues/11) -- [ ] writeWithoutResponse 写入不响应指定特性 [issue#12](https://github.com/react-native-oh-library/react-native-ble-manager/issues/12) -- [ ] removeBond 删除已配对的设备 [issue#13](https://github.com/react-native-oh-library/react-native-ble-manager/issues/13) -- [ ] getMaximumWriteValueLengthForWithoutResponse 用于获取在不带响应的情况下可以写入的最大数据长度 [issue#14](https://github.com/react-native-oh-library/react-native-ble-manager/issues/14) -- [ ] getMaximumWriteValueLengthForWithResponse 它用于获取在带有响应的情况下可以写入的最大数据长度 [issue#15](https://github.com/react-native-oh-library/react-native-ble-manager/issues/15) +- [ ] **refreshCache** is used to clear and refresh the cache of a Bluetooth device: [issue#3](https://github.com/react-native-oh-library/react-native-ble-manager/issues/3). +- [ ] **requestConnectionPriority** is used to request the Bluetooth connection priority: [issue#4](https://github.com/react-native-oh-library/react-native-ble-manager/issues/4). +- [ ] **startNotificationUseBuffer** is used to start a notification service with a buffer: [issue#6](https://github.com/react-native-oh-library/react-native-ble-manager/issues/6). +- [ ] **CompanionScan** is used to scan auxiliary devices: [issue#5](https://github.com/react-native-oh-library/react-native-ble-manager/issues/5). +- [ ] **getAssociatedPeripherals** is used to retrieve associated peripherals (from the mapping manager): [issue#7](https://github.com/react-native-oh-library/react-native-ble-manager/issues/7). +- [ ] **removeAssociatedPeripheral** is used to remove related peripheral devices: [issue#8](https://github.com/react-native-oh-library/react-native-ble-manager/issues/8). +- [ ] **setName** is used to create and set the name of a Bluetooth adapter: [issue#9](https://github.com/react-native-oh-library/react-native-ble-manager/issues/9). +- [ ] **supportsCompanion** is used to check whether the current device supports the mapping device manager: [issue#10](https://github.com/react-native-oh-library/react-native-ble-manager/issues/10). +- [ ] **stopNotification** is used to stop a notification with a certain feature: [issue#11](https://github.com/react-native-oh-library/react-native-ble-manager/issues/11). +- [ ] **writeWithoutResponse** is used to write without respond to a certain feature: [issue#12](https://github.com/react-native-oh-library/react-native-ble-manager/issues/12). +- [ ] **removeBond** is used to delete a paired device: [issue#13](https://github.com/react-native-oh-library/react-native-ble-manager/issues/13). +- [ ] **getMaximumWriteValueLengthForWithoutResponse** is used to obtain the maximum value that can be written in the case of no response: [issue#14](https://github.com/react-native-oh-library/react-native-ble-manager/issues/14). +- [ ] **getMaximumWriteValueLengthForWithResponse** is used to obtain the maximum value that can be written in the case of a response: [issue#15](https://github.com/react-native-oh-library/react-native-ble-manager/issues/15). ## Others diff --git a/zh-cn/react-native-ble-manager.md b/zh-cn/react-native-ble-manager.md index db850a90..45703471 100644 --- a/zh-cn/react-native-ble-manager.md +++ b/zh-cn/react-native-ble-manager.md @@ -45,7 +45,7 @@ yarn add @react-native-oh-tpl/react-native-ble-manager ```js import React, { useState, useEffect } from 'react'; -import { ScrollView, StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; +import { StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; import ReactNativeBleManager from 'react-native-ble-manager'; import { Peripheral } from 'react-native-ble-manager'; import { Colors } from 'react-native/Libraries/NewAppScreen'; @@ -185,21 +185,21 @@ export default function BleManagerDemo() { -- Gitee From 79c55468ec78959646bbffd6561745a81c36e8fe Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:10:38 +0800 Subject: [PATCH 3/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-comunity-checkbox=E5=BA=93=E7=9A=840.5.17?= =?UTF-8?q?=E5=8F=8A=E4=BB=A5=E4=B8=8A=E7=89=88=E6=9C=AC=E7=9A=84gitCode?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-community-checkbox.md | 4 ++-- zh-cn/react-native-community-checkbox.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en/react-native-community-checkbox.md b/en/react-native-community-checkbox.md index 70014fd7..b16be2b1 100644 --- a/en/react-native-community-checkbox.md +++ b/en/react-native-community-checkbox.md @@ -12,7 +12,7 @@ This third-party library has been migrated to Gitee and is now available for dir | Version | Package Name | Repository | Release | | ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | | <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | -| >= 0.5.17 | @react-native-ohos/checkbox | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | ## 1. Installation and Usage @@ -291,4 +291,4 @@ Check the release version information in the release address of the third-party ## 8. License -This project is licensed under [The MIT License (MIT)](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/blob/master/LICENSE). +This project is licensed under [The MIT License (MIT)](https://github.com/react-native-checkbox/react-native-checkbox/blob/develop/LICENSE). diff --git a/zh-cn/react-native-community-checkbox.md b/zh-cn/react-native-community-checkbox.md index faf10fe8..c0d11b50 100644 --- a/zh-cn/react-native-community-checkbox.md +++ b/zh-cn/react-native-community-checkbox.md @@ -12,7 +12,7 @@ | Version | Package Name | Repository | Release | | ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | | <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | -| >= 0.5.17 | @react-native-ohos/checkbox | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | ## 1. 安装与使用 @@ -290,4 +290,4 @@ ohpm install ## 8. 开源协议 -本项目基于 [The MIT License (MIT)](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +本项目基于 [The MIT License (MIT)](https://github.com/react-native-checkbox/react-native-checkbox/blob/develop/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file -- Gitee From 6aac097a122245738458a4f5075689f162fc2129 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:13:27 +0800 Subject: [PATCH 4/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-image-marker=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?=E5=8D=95=E8=AF=8D=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?Installation=20and=20Usage=E9=83=A8=E5=88=86=E5=B0=91=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E5=8F=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-image-marker.md | 8 ++++---- zh-cn/react-native-image-marker.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/en/react-native-image-marker.md b/en/react-native-image-marker.md index af103d80..e9ef2afc 100644 --- a/en/react-native-image-marker.md +++ b/en/react-native-image-marker.md @@ -16,7 +16,7 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases). +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -340,9 +340,9 @@ markImage(options: ImageMarkOptions): Promise; | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------ | ----------------- | ------ | -------- | ----------- | ----------------- | -| png | iamge type png | string | no | iOS/Android | yes | -| jpg | iamge type jpg | string | no | iOS/Android | yes | -| base64 | iamge type base64 | string | no | iOS/Android | yes | +| png | image type png | string | no | iOS/Android | yes | +| jpg | image type jpg | string | no | iOS/Android | yes | +| base64 | image type base64 | string | no | iOS/Android | yes | ##### WatermarkImageOptions diff --git a/zh-cn/react-native-image-marker.md b/zh-cn/react-native-image-marker.md index a0b77e64..d153019f 100644 --- a/zh-cn/react-native-image-marker.md +++ b/zh-cn/react-native-image-marker.md @@ -323,9 +323,9 @@ ohpm install | Name | Description | Type | Required | Platform | HarmonyOS Support | | ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- | -| png | iamge type png | string | no | iOS/Android | yes | -| jpg | iamge type jpg | string | no | iOS/Android | yes | -| base64 | iamge type base64 | string | no | iOS/Android | yes | +| png | image type png | string | no | iOS/Android | yes | +| jpg | image type jpg | string | no | iOS/Android | yes | +| base64 | image type base64 | string | no | iOS/Android | yes | ##### PositionOptions | Name | Description | Type | Required | Platform | HarmonyOS Support | -- Gitee From 8b4cedfeaff42093007c1480802c05a53b19dd82 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:15:10 +0800 Subject: [PATCH 5/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-restart=E7=A4=BA=E4=BE=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=AD=E7=BC=BA=E5=B0=91=E5=BC=95=E5=85=A5=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?=E6=9C=89=E4=B8=AD=E6=96=87=E6=8F=8F=E8=BF=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-restart.md | 3 ++- zh-cn/react-native-restart.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/en/react-native-restart.md b/en/react-native-restart.md index 20a554c5..3ce92c08 100644 --- a/en/react-native-restart.md +++ b/en/react-native-restart.md @@ -43,6 +43,7 @@ The following code shows the basic use scenario of the repository: > [!WARNING] The name of the imported repository remains unchanged. ```js +import React from 'react'; import {Text, View, StyleSheet} from 'react-native'; import RNRestart from 'react-native-restart'; @@ -171,4 +172,4 @@ Check the release version information in the release address of the third-party ## License -This project is licensed under [The MIT License (MIT)](https://github.com/avishayil/react-native-restart/blob/master/LICENSE),请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/avishayil/react-native-restart/blob/master/LICENSE) \ No newline at end of file diff --git a/zh-cn/react-native-restart.md b/zh-cn/react-native-restart.md index a09dcea3..5ca34d54 100644 --- a/zh-cn/react-native-restart.md +++ b/zh-cn/react-native-restart.md @@ -42,6 +42,7 @@ yarn add @react-native-oh-tpl/react-native-restart > [!WARNING] 使用时 import 的库名不变。 ```js +import React from 'react'; import {Text, View, StyleSheet} from 'react-native'; import RNRestart from 'react-native-restart'; -- Gitee From 0e6b9dd82bab0c340047bc2187e5304f914ed729 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:19:28 +0800 Subject: [PATCH 6/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-system-setting=E8=8B=B1=E6=96=87=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=AD=E7=9A=84=E4=B8=AD=E6=96=87=EF=BC=8C=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=96=87=E6=A1=A3=E4=B8=AD=E5=BC=95=E5=85=A5=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E6=96=87=E6=A1=A3=E9=93=BE=E6=8E=A5=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81=E9=A3=98=E7=BA=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-system-setting.md | 33 ++++++++++++++-------------- zh-cn/react-native-system-setting.md | 9 +++++--- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/en/react-native-system-setting.md b/en/react-native-system-setting.md index 2f2bd158..307a5689 100644 --- a/en/react-native-system-setting.md +++ b/en/react-native-system-setting.md @@ -44,10 +44,8 @@ The following code shows the basic use scenario of the repository: > [!WARNING] The name of the imported repository remains unchanged. ```tsx -import React, { useEffect, useState } from "react"; -import SystemSetting, { - EmitterSubscription, -} from "react-native-system-setting"; +import React, { useState } from "react"; +import SystemSetting from "react-native-system-setting"; import { ScrollView, Text, @@ -62,6 +60,7 @@ const SystemSettingDemo: React.FC = (): JSX.Element => { const enabled = await SystemSetting.isBluetoothEnabled(); setBluetoothEnabled(enabled); }; + let bluetoothEvent: Function = () => {}; return ( <> @@ -163,7 +162,7 @@ export default SystemSettingDemo; ## Use Codegen -If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). ## Link @@ -251,11 +250,11 @@ Check the release version information in the release address of the third-party ### Permission Requirements -由于此库涉及蓝牙、亮度等系统控制功能,使用对应接口时则需要配置对应的权限,权限需配置在 entry/src/main 目录下 module.json5 文件中。其中部分权限需弹窗向用户申请授权。具体权限配置见文档: [程序访问控制](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 +This library involves system control functions such as Bluetooth and brightness. Therefore, you need to configure the corresponding permission in the **module.json5** file in the **entry/src/main** directory when using the corresponding APIs. Some permissions need to be requested from users in a pop-up window. For details about the permission configuration, see [Application Access Control](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 -此库部分功能与接口需要 normal 权限: ohos.permission.ACCESS_BLUETOOTH、ohos.permission.GET_WIFI_INFO。 +Some functions and APIs of this library require the **normal** permissions **ohos.permission.ACCESS_BLUETOOTH** and **ohos.permission.GET_WIFI_INFO**. -此库部分功能与接口需要 full sdk 与 system_basic 权限: ohos.permission.MANAGE_SECURE_SETTINGS、ohos.permission.MANAGE_WIFI_CONNECTION 等,[full sdk 获取地址](https://eco-betaclub.rnd.huawei.com/#/download/DevEco%20Studio/newest),[system_basic 权限获取方式](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/determine-application-mode-0000001774120042-V5)。 +Some functions and APIs of this library require the [**full sdk**](https://eco-betaclub.rnd.huawei.com/#/download/DevEco%20Studio/newest) and [**system_basic**](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/determine-application-mode-0000001774120042-V5) permissions, such as **ohos.permission.MANAGE_SECURE_SETTINGS** and **ohos.permission.MANAGE_WIFI_CONNECTION**. ## API @@ -303,18 +302,18 @@ For details, see [react-native-system-setting](https://github.com/c19354837/reac ## Others -由于仅支持 Android/iOS 特有功能,HarmonyOS 暂无法实现的接口: [issue#11](https://github.com/react-native-oh-library/react-native-system-setting/issues/11) +HarmonyOS does not support certain APIs that are exclusive to Android/iOS: [issue#11](https://github.com/react-native-oh-library/react-native-system-setting/issues/11). ## Known Issues -- [ ] 由于系统音量权限问题,HarmonyOS 暂无法实现的接口: [issue#3](https://github.com/react-native-oh-library/react-native-system-setting/issues/3) -- [ ] 由于系统亮度与亮度模式权限问题,HarmonyOS 暂无法实现的接口: [issue#4](https://github.com/react-native-oh-library/react-native-system-setting/issues/4) -- [ ] 由于系统 WiFi 权限问题,HarmonyOS 暂无法实现的接口: [issue#5](https://github.com/react-native-oh-library/react-native-system-setting/issues/5) -- [ ] 由于系统未支持删除音量监听器,HarmonyOS 暂无法实现的接口: [issue#6](https://github.com/react-native-oh-library/react-native-system-setting/issues/6) -- [ ] 由于系统未支持位置服务模式监听器相关接口,HarmonyOS 暂无法实现的接口: [issue#7](https://github.com/react-native-oh-library/react-native-system-setting/issues/7) -- [ ] 由于系统未支持位置服务模式获取相关接口,HarmonyOS 暂无法实现的接口: [issue#8](https://github.com/react-native-oh-library/react-native-system-setting/issues/8) -- [ ] 由于系统未支持获取飞行模式状态相关接口,HarmonyOS 暂无法实现的接口: [issue#9](https://github.com/react-native-oh-library/react-native-system-setting/issues/9) -- [ ] 由于系统未支持飞行模式开关监听器相关接口,HarmonyOS 暂无法实现的接口: [issue#10](https://github.com/react-native-oh-library/react-native-system-setting/issues/10) +- [ ] HarmonyOS does not support certain APIs due to the system volume permission: [issue#3](https://github.com/react-native-oh-library/react-native-system-setting/issues/3). +- [ ] HarmonyOS does not support certain APIs due to the system brightness and brightness mode permission: [issue#4](https://github.com/react-native-oh-library/react-native-system-setting/issues/4). +- [ ] HarmonyOS does not support certain APIs due to the system Wi-Fi permission: [issue#5](https://github.com/react-native-oh-library/react-native-system-setting/issues/5). +- [ ] HarmonyOS does not support certain APIs because the system does not support the deletion of volume listeners: [issue#6](https://github.com/react-native-oh-library/react-native-system-setting/issues/6). +- [ ] HarmonyOS does not support certain APIs because the system does not support the location service mode listener APIs: [issue#7](https://github.com/react-native-oh-library/react-native-system-setting/issues/7). +- [ ] HarmonyOS does not support certain APIs because the system does not support the API for obtaining the location service mode: [issue#8](https://github.com/react-native-oh-library/react-native-system-setting/issues/8). +- [ ] HarmonyOS does not support certain APIs because the system does not support the API for obtaining the airplane mode status: [issue#9](https://github.com/react-native-oh-library/react-native-system-setting/issues/9). +- [ ] HarmonyOS does not support certain APIs because the system does not support the API for enabling or disabling the airplane mode listener: [issue#10](https://github.com/react-native-oh-library/react-native-system-setting/issues/10). ## License diff --git a/zh-cn/react-native-system-setting.md b/zh-cn/react-native-system-setting.md index 939073ee..48cdf7c6 100644 --- a/zh-cn/react-native-system-setting.md +++ b/zh-cn/react-native-system-setting.md @@ -46,9 +46,11 @@ yarn add @react-native-oh-tpl/react-native-system-setting >[!WARNING] 使用时 import 的库名不变。 ```tsx -import React, { useEffect, useState } from 'react' -import SystemSetting, { EmitterSubscription } from 'react-native-system-setting' -import { ScrollView, Text, View, StyleSheet, TouchableOpacity } from 'react-native' +import React, { useEffect, useState } from 'react'; +import SystemSetting, { + EmitterSubscription, +} from 'react-native-system-setting'; +import { ScrollView, Text, View, StyleSheet, TouchableOpacity } from 'react-native'; const SystemSettingDemo: React.FC = (): JSX.Element => { const [bluetoothEnabled, setBluetoothEnabled] = useState() @@ -56,6 +58,7 @@ const SystemSettingDemo: React.FC = (): JSX.Element => { const enabled = await SystemSetting.isBluetoothEnabled() setBluetoothEnabled(enabled) } + let bluetoothEvent: Function = () => {}; return ( <> -- Gitee From 40fa303e492fb2328eed4857d0c8a83a8792b5c2 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 16:23:10 +0800 Subject: [PATCH 7/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9rn-tourguide=E5=BA=93=E7=9A=84=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=A3=98=E7=BA=A2=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?Link=E9=83=A8=E5=88=86=E7=BC=BA=E5=B0=91=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/rn-tourguide.md | 10 +++++----- zh-cn/rn-tourguide.md | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/en/rn-tourguide.md b/en/rn-tourguide.md index 5b4b652c..96e3f26f 100644 --- a/en/rn-tourguide.md +++ b/en/rn-tourguide.md @@ -84,10 +84,10 @@ const AppContent = () => { }, [canStart]) React.useEffect(() => { - eventEmitter.on('start', () => console.log('start')) - eventEmitter.on('stop', () => console.log('stop')) - eventEmitter.on('stepChange', () => console.log(`stepChange`)) - return () => eventEmitter.off('*', null) + eventEmitter?.on('start', () => console.log('start')) + eventEmitter?.on('stop', () => console.log('stop')) + eventEmitter?.on('stepChange', () => console.log(`stepChange`)) + return () => eventEmitter?.off('*', () => {}) }, []) return ( @@ -202,7 +202,7 @@ const styles = StyleSheet.create({ The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-svg. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -If it is not included, follow the guide provided in @react-native-oh-tpl/react-native-svg to add it to your project. +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-svg](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-svg-capi.md#link) to add it to your project. ## Constraints diff --git a/zh-cn/rn-tourguide.md b/zh-cn/rn-tourguide.md index 96738f2e..80149b00 100644 --- a/zh-cn/rn-tourguide.md +++ b/zh-cn/rn-tourguide.md @@ -82,10 +82,10 @@ const AppContent = () => { }, [canStart]) React.useEffect(() => { - eventEmitter.on('start', () => console.log('start')) - eventEmitter.on('stop', () => console.log('stop')) - eventEmitter.on('stepChange', () => console.log(`stepChange`)) - return () => eventEmitter.off('*', null) + eventEmitter?.on('start', () => console.log('start')) + eventEmitter?.on('stop', () => console.log('stop')) + eventEmitter?.on('stepChange', () => console.log(`stepChange`)) + return () => eventEmitter?.off('*', () => {}) }, []) return ( -- Gitee From 66802dc6c5042d9b60333514a42dd522b78f3620 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Tue, 1 Jul 2025 17:32:10 +0800 Subject: [PATCH 8/8] =?UTF-8?q?docs:=20[Issues:=20#ICISQP]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-system-setting=E5=BA=93=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=AD=E7=9A=84=E8=8B=B1=E6=96=87=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-system-setting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/react-native-system-setting.md b/en/react-native-system-setting.md index 307a5689..6d9182cc 100644 --- a/en/react-native-system-setting.md +++ b/en/react-native-system-setting.md @@ -209,7 +209,7 @@ ohpm install Method 2: Directly link to the source code. -> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). +> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). ### 3. Introducing RNSystemSettingPackage to ArkTS @@ -250,7 +250,7 @@ Check the release version information in the release address of the third-party ### Permission Requirements -This library involves system control functions such as Bluetooth and brightness. Therefore, you need to configure the corresponding permission in the **module.json5** file in the **entry/src/main** directory when using the corresponding APIs. Some permissions need to be requested from users in a pop-up window. For details about the permission configuration, see [Application Access Control](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 +This library involves system control functions such as Bluetooth and brightness. Therefore, you need to configure the corresponding permission in the **module.json5** file in the **entry/src/main** directory when using the corresponding APIs. Some permissions need to be requested from users in a pop-up window. For details about the permission configuration, see [Application Access Control](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/AccessToken/Readme-EN.md#/openharmony/docs/blob/master/en/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 Some functions and APIs of this library require the **normal** permissions **ohos.permission.ACCESS_BLUETOOTH** and **ohos.permission.GET_WIFI_INFO**. -- Gitee