Skip to content

Commit f0dc403

Browse files
committed
Add CHANNEL variable setup
1 parent 5c53749 commit f0dc403

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
```shell
4242
cordova plugin add Your_Plugin_Path --variable APP_KEY=your_jpush_appkey
4343
```
44+
45+
- 需要同时动态配置 Android 的 JPUSH_CHANNEL 参数(v3.6.0+):
46+
47+
```shell
48+
cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_jpush_appkey --variable CHANNEL=your_channel
49+
```
50+
4451

4552
### Ionic
4653

plugin.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
id="jpush-phonegap-plugin"
5-
version="3.5.1">
5+
version="3.6.0">
66

77
<name>JPush</name>
88
<description>JPush for cordova plugin</description>
@@ -11,6 +11,7 @@
1111
<license>MIT License</license>
1212

1313
<preference name="APP_KEY" />
14+
<preference name="CHANNEL" default="developer-default" />
1415

1516
<engines>
1617
<engine name="cordova" version=">=3.0" />
@@ -212,11 +213,11 @@
212213

213214

214215
<!-- Required. Enable it you can get statistics data with channel -->
215-
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
216+
<meta-data android:name="JPUSH_CHANNEL" android:value="$CHANNEL" />
216217
<meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" />
217218
</config-file>
218219

219-
<lib-file src="src/android/libs/jpush-android-3.1.7.jar" />
220+
<lib-file src="src/android/libs/jpush-android-3.1.8.jar" />
220221

221222
<source-file src="src/android/JPushReceiver.java" target-dir="src/cn/jiguang/cordova/push" />
222223
<source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" />

0 commit comments

Comments
 (0)