react-native-notifyvisitors 4.3.3 → 4.3.5

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.
@@ -34,7 +34,7 @@ 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.1'
37
+ implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:v5.4.8'
38
38
 
39
39
  implementation platform('com.google.firebase:firebase-bom:30.3.1')
40
40
  implementation ('com.google.firebase:firebase-messaging')
@@ -43,7 +43,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
43
43
 
44
44
  private final ReactApplicationContext reactContext;
45
45
  private static final String TAG = "RN-NotifyVisitors";
46
- private static final String PLUGIN_VERSION = "4.3.3";
46
+ private static final String PLUGIN_VERSION = "4.3.5";
47
47
 
48
48
  private String PUSH_BANNER_CLICK_EVENT = "nv_push_banner_click";
49
49
  private String CHAT_BOT_BUTTON_CLICK = "nv_chat_bot_button_click";
@@ -1017,6 +1017,20 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
1017
1017
  }
1018
1018
  }
1019
1019
 
1020
+ @ReactMethod
1021
+ public void checkPushActive(String nv_choice) {
1022
+ try {
1023
+ Log.i(TAG, "Check Push Active !!");
1024
+ boolean signal = true;
1025
+ if (nv_choice.equalsIgnoreCase("false")) {
1026
+ signal = false;
1027
+ }
1028
+ NotifyVisitorsApi.getInstance(reactContext).enablePushPermission(signal);
1029
+ } catch (Exception e) {
1030
+ Log.i(TAG, "Check Push Active !! " + e);
1031
+ }
1032
+ }
1033
+
1020
1034
  private void intentDataClear() {
1021
1035
  try {
1022
1036
  new Timer().schedule(new TimerTask() {
package/index.d.ts CHANGED
@@ -39,6 +39,7 @@ export default class Notifyvisitors {
39
39
  static setAutoStartPermission_android_only(): void;
40
40
  static stopNotifications(): void;
41
41
  static clearPushData(): void;
42
+ static checkPushActive(nv_signal: any): void;
42
43
  static stopGeofencePushforDateTime(dateTime: any, additionalHours: any): void;
43
44
  static scheduleNotification(
44
45
  nid: any,
package/index.js CHANGED
@@ -382,6 +382,18 @@ export default class Notifyvisitors {
382
382
  console.log(e);
383
383
  }
384
384
  }
385
+
386
+ static checkPushActive(nv_signal) {
387
+ console.log("NV- Check Push Active !!");
388
+ try {
389
+ if (Platform.OS === 'android') {
390
+ RNNotifyvisitors.checkPushActive(nv_signal);
391
+ }
392
+ } catch (e) {
393
+ console.log(e);
394
+ }
395
+ }
396
+
385
397
  }
386
398
 
387
399
  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.3 !!");
35
+ NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.3.5 !!");
36
36
  NSString *nvMode = nil;
37
37
  #if DEBUG
38
38
  nvMode = @"debug";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-notifyvisitors",
3
- "version": "4.3.3",
3
+ "version": "4.3.5",
4
4
  "description": "React Native Notifyvisitors SDK for push notifications and surveys",
5
5
  "main": "index",
6
6
  "scripts": {
@@ -23,5 +23,5 @@ Pod::Spec.new do |s|
23
23
  # pod 'React', :path => '../node_modules/react-native/'
24
24
 
25
25
  # The Native Notifyvisitors-iOS-SDK from cocoapods.
26
- s.dependency 'notifyvisitors', '7.0.2'
26
+ s.dependency 'notifyvisitors', '7.0.3'
27
27
  end