diff --git a/package.json b/package.json index 6c150eb..1b381ae 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/plugin.xml b/plugin.xml index 7dbb64c..0698585 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="5.7.0"> JPush JPush for cordova plugin @@ -244,7 +244,7 @@ android:writePermission="${applicationId}.permission.JPUSH_MESSAGE" /> - + diff --git a/src/android/JPushPlugin.java b/src/android/JPushPlugin.java index 0b62a17..3aa8f78 100644 --- a/src/android/JPushPlugin.java +++ b/src/android/JPushPlugin.java @@ -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(); diff --git a/src/android/libs/jpush-android-5.6.0.jar b/src/android/libs/jpush-android-5.7.0.jar similarity index 65% rename from src/android/libs/jpush-android-5.6.0.jar rename to src/android/libs/jpush-android-5.7.0.jar index ff9ed47..da3eec0 100644 Binary files a/src/android/libs/jpush-android-5.6.0.jar and b/src/android/libs/jpush-android-5.7.0.jar differ diff --git a/www/JPushPlugin.js b/www/JPushPlugin.js index 79b682c..eebb143 100644 --- a/www/JPushPlugin.js +++ b/www/JPushPlugin.js @@ -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); };