react-native-notifyvisitors 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -34,7 +34,8 @@ android {
|
|
|
34
34
|
dependencies {
|
|
35
35
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
36
36
|
implementation 'com.facebook.react:react-native:+'
|
|
37
|
-
implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:v5.4.7'
|
|
37
|
+
//implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:v5.4.7'
|
|
38
|
+
implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:v5.4.7.1
|
|
38
39
|
|
|
39
40
|
implementation platform('com.google.firebase:firebase-bom:30.3.1')
|
|
40
41
|
implementation ('com.google.firebase:firebase-messaging')
|
|
@@ -36,13 +36,15 @@ import org.json.JSONObject;
|
|
|
36
36
|
import java.util.HashMap;
|
|
37
37
|
import java.util.HashSet;
|
|
38
38
|
import java.util.Set;
|
|
39
|
+
import java.util.Timer;
|
|
40
|
+
import java.util.TimerTask;
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implements ActivityEventListener {
|
|
42
44
|
|
|
43
45
|
private final ReactApplicationContext reactContext;
|
|
44
46
|
private static final String TAG = "RN-NotifyVisitors";
|
|
45
|
-
private static final String PLUGIN_VERSION = "4.3.
|
|
47
|
+
private static final String PLUGIN_VERSION = "4.3.1";
|
|
46
48
|
|
|
47
49
|
private String PUSH_BANNER_CLICK_EVENT = "nv_push_banner_click";
|
|
48
50
|
private String CHAT_BOT_BUTTON_CLICK = "nv_chat_bot_button_click";
|
|
@@ -68,6 +70,8 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
68
70
|
JSONObject mCustomObjects;
|
|
69
71
|
NVCenterStyleConfig config;
|
|
70
72
|
|
|
73
|
+
private final int NV_TIME_OUT = 5000;
|
|
74
|
+
|
|
71
75
|
|
|
72
76
|
/* constructor */
|
|
73
77
|
public RNNotifyvisitorsModule(ReactApplicationContext reactContext) {
|
|
@@ -983,6 +987,33 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
983
987
|
}
|
|
984
988
|
}
|
|
985
989
|
|
|
990
|
+
@ReactMethod
|
|
991
|
+
public void clearPushData() {
|
|
992
|
+
try {
|
|
993
|
+
Log.i(TAG, "CLEAR PUSH DATA !!");
|
|
994
|
+
intentDataClear();
|
|
995
|
+
} catch (Exception e) {
|
|
996
|
+
Log.i(TAG, "CLEAR PUSH DATA : " + e);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
private void intentDataClear() {
|
|
1001
|
+
try {
|
|
1002
|
+
new Timer().schedule(new TimerTask() {
|
|
1003
|
+
@Override
|
|
1004
|
+
public void run() {
|
|
1005
|
+
Log.i(TAG, "Intent Data Cleared !!!!");
|
|
1006
|
+
finalData = null;
|
|
1007
|
+
}
|
|
1008
|
+
}, NV_TIME_OUT);
|
|
1009
|
+
|
|
1010
|
+
} catch (Exception e) {
|
|
1011
|
+
Log.i(TAG, "Intent Data Clear ERROR : " + e);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
|
|
986
1017
|
|
|
987
1018
|
/* On Activity Result */
|
|
988
1019
|
@Override
|
package/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export default class Notifyvisitors {
|
|
|
38
38
|
static getNotificationCenterData(callback: any): void;
|
|
39
39
|
static setAutoStartPermission_android_only(): void;
|
|
40
40
|
static stopNotifications(): void;
|
|
41
|
+
static clearPushData(): void;
|
|
41
42
|
static stopGeofencePushforDateTime(dateTime: any, additionalHours: any): void;
|
|
42
43
|
static scheduleNotification(
|
|
43
44
|
nid: any,
|
package/index.js
CHANGED
|
@@ -371,6 +371,17 @@ export default class Notifyvisitors {
|
|
|
371
371
|
console.log(e);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
+
|
|
375
|
+
static clearPushData() {
|
|
376
|
+
console.log("NV- Clear Push Data !!");
|
|
377
|
+
try {
|
|
378
|
+
if (Platform.OS === 'android') {
|
|
379
|
+
RNNotifyvisitors.clearPushData();
|
|
380
|
+
}
|
|
381
|
+
} catch (e) {
|
|
382
|
+
console.log(e);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
374
385
|
}
|
|
375
386
|
|
|
376
387
|
export class PushPromptInfo {
|
|
@@ -32,7 +32,7 @@ int nvCheckPushClickTimeCounter = 0;
|
|
|
32
32
|
|
|
33
33
|
+(void)Initialize{
|
|
34
34
|
NSLog(@"RN-NotifyVisitors : INITIALIZE !!");
|
|
35
|
-
NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.3.
|
|
35
|
+
NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.3.1 !!");
|
|
36
36
|
NSString *nvMode = nil;
|
|
37
37
|
#if DEBUG
|
|
38
38
|
nvMode = @"debug";
|