diff --git a/README.md b/README.md index 96d225b..ceef4a2 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,32 @@ description: 腾讯移动推送插件 cordova plugin add cordova-plugin-tpns --variable XG_ACCESS_ID=${XG_ACCESS_ID} --variable XG_ACCESS_KEY=${XG_ACCESS_KEY} ``` +### Params + +| 参数 | 说明 | 默认值 | 是否必须 | +| ------------------ | --------------- | ---------------- | ---- | +| XG\_ACCESS\_ID | 腾讯移动推送accessID | | 是 | +| XG\_ACCESS\_KEY | 腾讯移动推送accessKey | | 是 | +| VIVO\_APPID | vivo厂商通道appid | VIVO\_APPID | 否 | +| VIVO\_APPKEY | vivo厂商通道appkey | VIVO\_APPKEY | 否 | +| HONOR\_APPID | 荣耀厂商通道appid | HONOR\_APPID | 否 | +| XG\_SERVER\_SUFFIX | 腾讯移动推服务接入点 | tpns.tencent.com | 否 | + +#### 接入点值 + +* 广州:`tpns.tencent.com` + +* 上海:`tpns.sh.tencent.com` + +* 新加坡:`tpns.sgp.tencent.com` + +* 中国香港:`tpns.hk.tencent.com` + ## Supported Platforms * Android -> 当前版本仅支持**魅族**和**小米**的厂商通道 +> 当前版本暂不支持**华为**的厂商通道 ## Get Started diff --git a/plugin.xml b/plugin.xml index 91ddf31..5df0f8d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -14,6 +14,10 @@ + + + + @@ -47,7 +51,8 @@ - + + diff --git a/src/android/build-tpns.gradle b/src/android/build-tpns.gradle index ae2bf08..6816136 100644 --- a/src/android/build-tpns.gradle +++ b/src/android/build-tpns.gradle @@ -33,6 +33,9 @@ android { manifestPlaceholders = [ XG_ACCESS_ID : getConfigPreference("XG_ACCESS_ID"), XG_ACCESS_KEY : getConfigPreference("XG_ACCESS_KEY"), + VIVO_APPID: getConfigPreference("VIVO_APPID"), + VIVO_APPKEY: getConfigPreference("VIVO_APPKEY"), + HONOR_APPID: getConfigPreference("HONOR_APPID") ] } } @@ -40,10 +43,10 @@ dependencies { //添加以下依赖 implementation 'com.tencent.tpns:tpns:1.4.0.1-release' // TPNS 推送 [VERSION] 为最新 SDK 版本号,即为上述步骤2获取的版本号 - //implementation 'com.tencent.tpns:honor:1.4.0.1-release' //荣耀 + implementation 'com.tencent.tpns:honor:1.4.0.1-release' //荣耀 implementation 'com.tencent.tpns:meizu:1.4.0.1-release' //魅族 implementation 'com.tencent.tpns:xiaomi:1.4.0.1-release'//小米推送 [VERSION] 为当前 SDK 版本号,版本号可在 Android SDK 发布动态查看 - //implementation 'com.tencent.tpns:vivo:1.4.0.1-release' // vivo 推送 [VERSION] 为当前 SDK 版本号,版本号可在 Android SDK 发布动态查看 + implementation 'com.tencent.tpns:vivo:1.4.0.1-release' // vivo 推送 [VERSION] 为当前 SDK 版本号,版本号可在 Android SDK 发布动态查看 // OPPO 推送 SDK,[VERSION] 为当前 SDK 版本号,版本号可在 Android SDK 发布动态查看 implementation 'com.tencent.tpns:oppo:1.4.0.1-release'