react-native-huawei-push
v1.2.0
Published
A react native module for huawei push.
Downloads
12
Maintainers
Readme
react-native-huawei-push
安装
npm install react-native-huawei-push --save
or
yarn add react-native-huawei-push
集成
android/app/src/main/AndroidManifest.xml 添加配置
<!-- 华为推送 -->
<application>
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="appid=${HUAWEI_APPID}" />
</application>
android/build.gradle 设置maven仓库地址
allprojects {
repositories {
maven { url 'http://developer.huawei.com/repo/' }
}
}
android/app/build.gradle 设置申请的AppId
android {
defaultConfig {
manifestPlaceholders = [
HUAWEI_APPID: "<app_id>",
]
}
}
使用
import RNHuaweiPush from 'react-native-huawei-push';