diff --git a/android/build.gradle b/android/build.gradle index b243e2ad..469bdcfa 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -18,7 +18,7 @@ android { minSdkVersion 16 targetSdkVersion 31 versionCode 1 - versionName '3.8.2' + versionName '3.8.6' } lintOptions { abortOnError false @@ -45,5 +45,5 @@ repositories { dependencies { api 'com.facebook.react:react-native:+' - api 'io.radar:sdk:3.8.5' + api 'io.radar:sdk:3.8.6' } diff --git a/android/src/main/java/io/radar/react/RNRadarModule.java b/android/src/main/java/io/radar/react/RNRadarModule.java index a36ab207..1c7d9f8a 100644 --- a/android/src/main/java/io/radar/react/RNRadarModule.java +++ b/android/src/main/java/io/radar/react/RNRadarModule.java @@ -78,9 +78,13 @@ public String getName() { } @ReactMethod - public void initialize(String publishableKey) { - Radar.initialize(getReactApplicationContext(), publishableKey); - Radar.setReceiver(receiver); + public void initialize(String publishableKey, boolean fraud) { + if (fraud) { + Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud); + } else { + Radar.initialize(getReactApplicationContext(), publishableKey); + Radar.setReceiver(receiver); + } } @ReactMethod diff --git a/example/App.js b/example/App.js index af0cd0fb..8d758c5a 100644 --- a/example/App.js +++ b/example/App.js @@ -39,7 +39,7 @@ export default function App() { const stringify = (obj) => JSON.stringify(obj, null, 2); useEffect(() => { - Radar.initialize("prj_test_pk_4ce462a534c0f749af3fdaac6fff9f485d65e720"); + Radar.initialize("prj_test_pk_0000000000000000000000000000000000000000", true); Radar.setLogLevel("info"); @@ -479,6 +479,19 @@ export default function App() { }); }} /> + + { + Radar.trackVerified() + .then((result) => { + handlePopulateText("trackVerified:" + stringify(result)); + }) + .catch((err) => { + handlePopulateText("trackVerified:" + err); + }); + }} + /> diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 39725e5b..4045cd57 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -189,6 +189,7 @@ dependencies { strictly '1.3.1' } } + implementation 'com.google.android.play:integrity:1.0.2' implementation fileTree(dir: "libs", include: ["*.jar"]) //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index d4f2bc60..3c7facd2 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -242,7 +242,7 @@ PODS: - React-jsi (= 0.64.3) - React-perflogger (= 0.64.3) - React-jsinspector (0.64.3) - - react-native-radar (3.8.4): + - react-native-radar (3.8.5): - RadarSDK (~> 3.8.4) - React - react-native-safe-area-context (3.3.2): @@ -529,7 +529,7 @@ SPEC CHECKSUMS: EXUpdates: 061b67c33f0e7f8fd335bbb48697c4a4fc8a5157 EXUpdatesInterface: e1c01b4f5ec76bd1d6cc714938f9edf5ef6379b9 FBLazyVector: c71c5917ec0ad2de41d5d06a5855f6d5eda06971 - FBReactNativeSpec: d55cc83d9dc993d9832c60fb5343bf811f1cd092 + FBReactNativeSpec: 0927ccb6f474e439386ebce65cccb07b9612e950 glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 maplibre-react-native: f08cc1b867c4b3080b34955f8e2ce938361df4c2 RadarSDK: 00aac8132174517cd0de9b43af0aa168edaf5a4c @@ -544,7 +544,7 @@ SPEC CHECKSUMS: React-jsi: a8b09c29521c798f1783348b37b511ba7b3dbeb3 React-jsiexecutor: df6abc9fafbecb8e5b7a5fbc5e6d4bd017d594d5 React-jsinspector: 34e23860273a23695342f58eed3ffd3ba10c31e0 - react-native-radar: 120e6fb7d2c87fe3ea917a5e83a86e53e36eee3c + react-native-radar: 387abf87eb20ad528ee5bd5cd81fa57e8a230475 react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057 React-perflogger: cc76a4254d19640f1d8ad1c66fdee800414b805c React-RCTActionSheet: 7448f049318d8d7e8a9a1ebb742ada721757eea8 @@ -567,4 +567,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: ac3241f9540525d739bc6e1ec2f5381dee057b14 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/example/package-lock.json b/example/package-lock.json index 234d6bde..ccb7bd4b 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -41,7 +41,7 @@ } }, "..": { - "version": "3.8.4", + "version": "3.8.5", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.21.0", diff --git a/example/yarn.lock b/example/yarn.lock index 2114ba02..78f40f8b 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -7523,7 +7523,7 @@ "react-native-radar@../": "resolved" "file:.." - "version" "3.8.4" + "version" "3.8.5" dependencies: "@babel/runtime" "^7.21.0" "@react-native-community/netinfo" "^7.1.3" diff --git a/ios/RNRadar.m b/ios/RNRadar.m index 28f0a2f1..3d3b439c 100644 --- a/ios/RNRadar.m +++ b/ios/RNRadar.m @@ -91,7 +91,7 @@ - (void)didLogMessage:(NSString *)message { } } -RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey) { +RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) { [Radar initializeWithPublishableKey:publishableKey]; } diff --git a/js/index.native.js b/js/index.native.js index bf764ece..a97b8e4a 100644 --- a/js/index.native.js +++ b/js/index.native.js @@ -6,8 +6,8 @@ if (!NativeModules.RNRadar && (Platform.OS === 'ios' || Platform.OS === 'android const eventEmitter = new NativeEventEmitter(NativeModules.RNRadar); -const initialize = (publishableKey) => { - NativeModules.RNRadar.initialize(publishableKey); +const initialize = (publishableKey, fraud) => { + NativeModules.RNRadar.initialize(publishableKey, fraud); }; const setLogLevel = (level) => { diff --git a/package-lock.json b/package-lock.json index acc4c138..753a69e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-native-radar", - "version": "3.8.4", + "version": "3.8.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-native-radar", - "version": "3.8.4", + "version": "3.8.5", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.21.0", diff --git a/package.json b/package.json index f2ee8801..ce96e017 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "React Native module for Radar, the leading geofencing and location tracking platform", "homepage": "https://radar.com", "license": "Apache-2.0", - "version": "3.8.4", + "version": "3.8.5", "main": "js/index.js", "files": [ "android",