mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-05-11 05:01:40 +08:00
更新安卓jpush570+新增setDataInsightsEnable接口+更新版本号为5.7.0
This commit is contained in:
parent
f140784c9c
commit
795242e0c9
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jpush-phonegap-plugin",
|
||||
"version": "5.6.0",
|
||||
"version": "5.7.0",
|
||||
"description": "JPush for cordova plugin",
|
||||
"cordova": {
|
||||
"id": "jpush-phonegap-plugin",
|
||||
|
@ -2,7 +2,7 @@
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="jpush-phonegap-plugin"
|
||||
version="5.6.0">
|
||||
version="5.7.0">
|
||||
|
||||
<name>JPush</name>
|
||||
<description>JPush for cordova plugin</description>
|
||||
@ -244,7 +244,7 @@
|
||||
android:writePermission="${applicationId}.permission.JPUSH_MESSAGE" />
|
||||
</config-file>
|
||||
|
||||
<lib-file src="src/android/libs/jpush-android-5.6.0.jar" />
|
||||
<lib-file src="src/android/libs/jpush-android-5.7.0.jar" />
|
||||
|
||||
<source-file src="src/android/PushService.java" target-dir="src/cn/jiguang/cordova/push" />
|
||||
<source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" />
|
||||
|
@ -285,6 +285,17 @@ public class JPushPlugin extends CordovaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
void setDataInsightsEnable(JSONArray data, CallbackContext callbackContext) {
|
||||
boolean mode;
|
||||
try {
|
||||
mode = data.getBoolean(0);
|
||||
JPushInterface.setDataInsightsEnable(mContext,mode);
|
||||
callbackContext.success();
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
void stopPush(JSONArray data, CallbackContext callbackContext) {
|
||||
JPushInterface.stopPush(mContext);
|
||||
callbackContext.success();
|
||||
|
Binary file not shown.
@ -59,6 +59,12 @@ JPushPlugin.prototype.setDebugMode = function(mode) {
|
||||
}
|
||||
};
|
||||
|
||||
JPushPlugin.prototype.setDataInsightsEnable = function(mode) {
|
||||
if (device.platform === "Android") {
|
||||
this.callNative("setDataInsightsEnable", [mode], null);
|
||||
}
|
||||
};
|
||||
|
||||
JPushPlugin.prototype.getRegistrationID = function(successCallback) {
|
||||
this.callNative("getRegistrationID", [], successCallback);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user