Skip to content

Commit 99c2d27

Browse files
committed
android更新JPush 570+版本号3.1.6+新增setDataInsightsEnable接口
1 parent 45c3731 commit 99c2d27

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

android/src/main/java/cn/jiguang/plugins/push/JPushModule.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ public void setSmartPushEnable(boolean enable) {
137137
JPushInterface.setSmartPushEnable(reactContext, enable);
138138
}
139139

140+
@ReactMethod
141+
public void setDataInsightsEnable(boolean enable) {
142+
JPushInterface.setDataInsightsEnable(reactContext, enable);
143+
}
144+
140145
@ReactMethod
141146
public void setGeofenceEnable(boolean enable) {
142147
JPushInterface.setGeofenceEnable(reactContext, enable);

index.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,15 @@ export default class JPush {
525525
*/
526526
static setSmartPushEnable(enable: boolean): void;
527527

528+
/**
529+
* 设置应用数据洞察
530+
*
531+
*
532+
* @param {boolean} enable, YES:开启,NO:关闭,默认是开启。
533+
*
534+
*/
535+
static setDataInsightsEnable(enable: boolean): void;
536+
528537
/**
529538
* 数据采集控制, YES:开启,NO:关闭, 默认开启
530539
*

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,13 @@ export default class JPush {
730730
JPushModule.setSmartPushEnable(enable)
731731
}
732732
}
733+
static setDataInsightsEnable(enable) {
734+
if (Platform.OS == "ios") {
735+
736+
}else if (Platform.OS == "android") {
737+
JPushModule.setDataInsightsEnable(enable)
738+
}
739+
}
733740
static setGeofenceEnable(enable) {
734741
if (Platform.OS == "ios") {
735742
}else if (Platform.OS == "android") {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"types": "index.d.ts",
77
"license": "ISC",
88
"author": "wicked.tc130",
9-
"version": "3.1.5",
9+
"version": "3.1.6",
1010
"repository": {
1111
"type": "git",
1212
"url": "https://github.com/jpush/jpush-react-native"

0 commit comments

Comments
 (0)