文档模板:v0.4.2

react-native-system-setting

本项目基于 react-native-system-setting 开发。

该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-system-setting(JS 别名 react-native-system-setting),版本所属关系如下:

三方库名称 三方库版本(npm地址) 发布信息 支持RN版本 Autolink 编译API版本 社区基线版本 源码地址
@react-native-ohos/react-native-system-setting ~ 1.9.0 (开发中) Gitcode Releases 0.84.* / 0.82.* API12+ 1.7.6 master
@react-native-ohos/react-native-system-setting ~ 1.8.0 Gitcode Releases 0.77.* API12+ 1.7.6 br_rnoh0.77
@react-native-ohos/react-native-system-setting ~ 1.7.7 Gitcode Releases 0.72.* API12+ 1.7.6 br_rnoh0.72
@react-native-oh-tpl/react-native-system-setting <= 1.7.6-0.0.1@deprecated Github Releases(deprecated) 0.72.* API12+ 1.7.6 sig

简介

react-native-system-setting 提供音量、亮度、WiFi、定位、蓝牙、飞行模式等系统设置的读取与控制能力。

本库为其提供 React Native 鸿蒙(HarmonyOS)适配,基于 TurboModule 实现,支持音量/亮度获取与设置、各系统开关状态查询、跳转设置页、状态监听等接口。

下载安装

进入到工程目录并输入以下命令:

npm

npm install @react-native-ohos/react-native-system-setting

yarn

yarn add @react-native-ohos/react-native-system-setting