react-native-radar 3.10.4-beta.2 → 3.10.4

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.
@@ -18,7 +18,7 @@ android {
18
18
  minSdkVersion 16
19
19
  targetSdkVersion 31
20
20
  versionCode 1
21
- versionName '3.10.4-beta.2'
21
+ versionName '3.10.4'
22
22
  }
23
23
  lintOptions {
24
24
  abortOnError false
@@ -45,5 +45,5 @@ repositories {
45
45
 
46
46
  dependencies {
47
47
  api 'com.facebook.react:react-native:+'
48
- api 'io.radar:sdk:3.9.4'
48
+ api 'io.radar:sdk:3.9.5'
49
49
  }
@@ -2,6 +2,8 @@ package io.radar.react;
2
2
 
3
3
  import android.Manifest;
4
4
  import android.app.Activity;
5
+ import android.content.Context;
6
+ import android.content.SharedPreferences;
5
7
  import android.content.pm.PackageManager;
6
8
  import android.location.Location;
7
9
  import android.os.Build;
@@ -42,8 +44,6 @@ import org.json.JSONObject;
42
44
 
43
45
  import java.util.EnumSet;
44
46
  import java.util.Map;
45
- import android.content.SharedPreferences;
46
- import android.content.Context;
47
47
 
48
48
  public class RNRadarModule extends ReactContextBaseJavaModule implements PermissionListener {
49
49
 
@@ -55,14 +55,11 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
55
55
  private RNRadarVerifiedReceiver verifiedReceiver;
56
56
  private int listenerCount = 0;
57
57
  private boolean fraud = false;
58
- private final ReactApplicationContext reactContext;
59
-
60
58
 
61
59
  public RNRadarModule(ReactApplicationContext reactContext) {
62
60
  super(reactContext);
63
61
  receiver = new RNRadarReceiver();
64
62
  verifiedReceiver = new RNRadarVerifiedReceiver();
65
- this.reactContext = reactContext;
66
63
  }
67
64
 
68
65
  @ReactMethod
@@ -96,6 +93,10 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
96
93
  @ReactMethod
97
94
  public void initialize(String publishableKey, boolean fraud) {
98
95
  this.fraud = fraud;
96
+ SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
97
+ editor.putString("x_platform_sdk_type", "ReactNative");
98
+ editor.putString("x_platform_sdk_version", "3.10.4");
99
+ editor.apply();
99
100
  if (fraud) {
100
101
  Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
101
102
  Radar.setVerifiedReceiver(verifiedReceiver);
@@ -103,10 +104,6 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
103
104
  Radar.initialize(getReactApplicationContext(), publishableKey);
104
105
  Radar.setReceiver(receiver);
105
106
  }
106
- SharedPreferences sharedPref = reactContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE);
107
- SharedPreferences.Editor editor = sharedPref.edit();
108
- editor.putString("x_platform_sdk_version", "3.10.4-beta.2");
109
- editor.apply();
110
107
  }
111
108
 
112
109
  @ReactMethod
package/dist/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React Native module for Radar, the leading geofencing and location tracking platform",
4
4
  "homepage": "https://radar.com",
5
5
  "license": "Apache-2.0",
6
- "version": "3.10.4-beta.2",
6
+ "version": "3.10.4",
7
7
  "main": "dist/src/index.js",
8
8
  "files": [
9
9
  "android",
package/ios/RNRadar.m CHANGED
@@ -99,8 +99,9 @@ RCT_EXPORT_MODULE();
99
99
  }
100
100
 
101
101
  RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
102
- [Radar initializeWithPublishableKey:publishableKey];
103
- [[NSUserDefaults standardUserDefaults] setObject:@"3.10.4-beta.2" forKey:@"radar-xPlatformSDKVersion"];
102
+ [[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
103
+ [[NSUserDefaults standardUserDefaults] setObject:@"3.10.4" forKey:@"radar-xPlatformSDKVersion"];
104
+ [Radar initializeWithPublishableKey:publishableKey];
104
105
  }
105
106
 
106
107
  RCT_EXPORT_METHOD(setLogLevel:(NSString *)level) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React Native module for Radar, the leading geofencing and location tracking platform",
4
4
  "homepage": "https://radar.com",
5
5
  "license": "Apache-2.0",
6
- "version": "3.10.4-beta.2",
6
+ "version": "3.10.4",
7
7
  "main": "dist/src/index.js",
8
8
  "files": [
9
9
  "android",