diff --git a/en/react-native-orientation-locker.md b/en/react-native-orientation-locker.md index 814e61ff0c0149dd26f0894ad070d6c7f83e6a19..873262f674ee56d0888ace54383d07bce1ba8188 100644 --- a/en/react-native-orientation-locker.md +++ b/en/react-native-orientation-locker.md @@ -313,6 +313,20 @@ This document is verified based on the following versions: 1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18; 2. RNOH: 0.72.33; SDK: OpenHarmony 5.0.0.71 (API Version 12 Release); IDE: DevEco Studio 5.0.3.900; ROM: NEXT.0.0.71; +### Permission Requirements +Due to the fact that this library obtains data from acceleration sensors, corresponding permissions need to be configured when using it. +The permissions need to be configured in the entry/src/main directory and added to module.json5 as follows:: + +```diff +... +"requestPermissions": [ +... ++ { ++ "name": "ohos.permission.ACCELEROMETER" ++ } + ] +``` + ## API > [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/zh-cn/react-native-orientation-locker.md b/zh-cn/react-native-orientation-locker.md index db74476fdfb35df6d9503efe1fcc1420cee93df7..45394872b7b09543b4fcfd1b16fde8c4f92723b7 100644 --- a/zh-cn/react-native-orientation-locker.md +++ b/zh-cn/react-native-orientation-locker.md @@ -318,6 +318,19 @@ ohpm install 1. RNOH: 0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18; 2. RNOH: 0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; +### 权限要求 +由于此库获取加速度传感器的数据,使用时需要配置对应的权限,权限需配置在entry/src/main目录下module.json5 中添加如下权限: + +```diff +... +"requestPermissions": [ +... ++ { ++ "name": "ohos.permission.ACCELEROMETER" ++ } + ] +``` + ## API > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。