react-native-netmera 1.6.0 → 1.6.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/README.md CHANGED
@@ -419,4 +419,26 @@ Note: To show popup on the app start or everywhere in the app, please add this t
419
419
  Netmera.enablePopupPresentation();
420
420
  ```
421
421
 
422
+ ##### Data Start-Stop Transfer
423
+
424
+ ###### Stop Data Transfer Method
425
+
426
+ The stopDataTransfer() method is a useful feature that can help users to temporarily pause all requests sent by the SDK to the backend.
427
+ This can be useful if, for example, the user needs to temporarily halt data transfers due to network issues or other reasons.
428
+ Once the issue has been resolved, the user can then restart the data transfer using the startDataTransfer() method.
429
+
430
+ ```
431
+ Netmera.stopDataTransfer();
432
+ ```
433
+
434
+ ###### Start Data Transfer Method
435
+
436
+ The startDataTransfer() method is a complementary feature to the stopDataTransfer() method, which allows users to restart any stopped requests.
437
+ This can be useful when the user has temporarily paused data transfers and is now ready to resume the transfer. Once the user calls the
438
+ startDataTransfer() method, the SDK will attempt to resend any requests that were previously stopped.
439
+
440
+ ```
441
+ Netmera.startDataTransfer();
442
+ ```
443
+
422
444
  Please explore [our example project](https://github.com/Netmera/Netmera-React-Native-Example) for detailed information.
@@ -1,12 +1,11 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  android {
4
- compileSdkVersion 32
5
- buildToolsVersion "29.0.2"
4
+ compileSdk 33
6
5
 
7
6
  defaultConfig {
8
7
  minSdkVersion 16
9
- targetSdkVersion 32
8
+ targetSdkVersion 33
10
9
  versionCode 1
11
10
  versionName "1.0"
12
11
  }
@@ -16,8 +15,8 @@ android {
16
15
  }
17
16
 
18
17
  dependencies {
19
- implementation 'com.netmera:nmcore:3.10.1'
20
- implementation 'com.netmera:nmfcm:3.10.1'
18
+ implementation 'com.netmera:nmcore:3.10.2'
19
+ implementation 'com.netmera:nmfcm:3.10.2'
21
20
  implementation 'com.netmera:nmhms:3.10.1'
22
21
  implementation 'com.facebook.react:react-native:+'
23
22
  }
@@ -23,7 +23,7 @@ public class RNNetmera {
23
23
  static void setNetmeraHeaders() {
24
24
  ContentValues headerValues = new ContentValues();
25
25
  headerValues.put("X-netmera-framework", "react");
26
- headerValues.put("X-netmera-frameworkV", "1.6.0");
26
+ headerValues.put("X-netmera-frameworkV", "1.6.1");
27
27
  Netmera.setNetmeraHeaders(headerValues);
28
28
  }
29
29
 
@@ -512,6 +512,16 @@ public class RNNetmeraModule extends ReactContextBaseJavaModule {
512
512
  Netmera.onNetmeraNewToken(pushToken);
513
513
  }
514
514
 
515
+ @ReactMethod
516
+ public static void startDataTransfer() {
517
+ Netmera.startDataTransfer();
518
+ }
519
+
520
+ @ReactMethod
521
+ public static void stopDataTransfer() {
522
+ Netmera.stopDataTransfer();
523
+ }
524
+
515
525
  private boolean hasKey(Map map, String key) {
516
526
  return map.containsKey(key) && map.get(key) != null;
517
527
  }
package/ios/RNNetmera.m CHANGED
@@ -46,7 +46,7 @@ NSString *const ERROR_MESSAGE_SET_CATEGORY_PREFERENCE = @"Error occurred while s
46
46
 
47
47
  + (void)setNetmeraHeaders {
48
48
  [Netmera setFramework:@"react"];
49
- [Netmera setFrameworkVersion:@"1.6.0"];
49
+ [Netmera setFrameworkVersion:@"1.6.1"];
50
50
  }
51
51
 
52
52
  + (void)setPushDelegate:(NSObject<NetmeraPushDelegate> *)delegate {
@@ -123,6 +123,14 @@ RCT_EXPORT_METHOD(disablePush) {
123
123
  [Netmera setEnabledReceivingPushNotifications:false];
124
124
  }
125
125
 
126
+ RCT_EXPORT_METHOD(startDataTransfer) {
127
+ [Netmera startDataTransfer];
128
+ }
129
+
130
+ RCT_EXPORT_METHOD(stopDataTransfer) {
131
+ [Netmera stopDataTransfer];
132
+ }
133
+
126
134
  RCT_EXPORT_METHOD(fetchInbox:(NSDictionary *)inboxDictionary
127
135
  resolver: (RCTPromiseResolveBlock)resolve
128
136
  rejecter:(RCTPromiseRejectBlock)reject) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-netmera",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Netmera React Native SDK",
5
5
  "main": "index.ts",
6
6
  "author": "netmera",
package/src/Netmera.ts CHANGED
@@ -133,6 +133,14 @@ export default class Netmera {
133
133
  }
134
134
  };
135
135
 
136
+ static startDataTransfer = () => {
137
+ RNNetmera.startDataTransfer();
138
+ };
139
+
140
+ static stopDataTransfer = () => {
141
+ RNNetmera.stopDataTransfer();
142
+ };
143
+
136
144
  static fetchInbox = (
137
145
  netmeraInboxFilter: NetmeraInboxFilter
138
146
  ): Promise<Array<NetmeraPushInbox>> => {