react-native-radar 3.5.4 → 3.5.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.
package/android/build.gradle
CHANGED
|
@@ -192,15 +192,15 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
192
192
|
location.setLongitude(longitude);
|
|
193
193
|
location.setAccuracy(accuracy);
|
|
194
194
|
}
|
|
195
|
-
if (optionsMap.hasKey("
|
|
196
|
-
String
|
|
197
|
-
if (
|
|
195
|
+
if (optionsMap.hasKey("desiredAccuracy")) {
|
|
196
|
+
String desiredAccuracy = optionsMap.getString("desiredAccuracy").toLowerCase();
|
|
197
|
+
if (desiredAccuracy.equals("none")) {
|
|
198
198
|
accuracyLevel = RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy.NONE;
|
|
199
|
-
} else if (
|
|
199
|
+
} else if (desiredAccuracy.equals("low")) {
|
|
200
200
|
accuracyLevel = RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy.LOW;
|
|
201
|
-
} else if (
|
|
201
|
+
} else if (desiredAccuracy.equals("medium")) {
|
|
202
202
|
accuracyLevel = RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy.MEDIUM;
|
|
203
|
-
} else if (
|
|
203
|
+
} else if (desiredAccuracy.equals("high")) {
|
|
204
204
|
accuracyLevel = RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy.HIGH;
|
|
205
205
|
}
|
|
206
206
|
}
|
package/ios/RNRadar.m
CHANGED
|
@@ -219,22 +219,22 @@ RCT_EXPORT_METHOD(trackOnce:(NSDictionary *)optionsDict resolve:(RCTPromiseResol
|
|
|
219
219
|
rejecter = nil;
|
|
220
220
|
};
|
|
221
221
|
|
|
222
|
-
NSString *accuracy = optionsDict[@"accuracy"];
|
|
223
|
-
|
|
224
|
-
if (accuracy != nil && [accuracy isKindOfClass:[NSString class]]) {
|
|
225
|
-
NSString *lowerAccuracy = [accuracy lowercaseString];
|
|
226
|
-
if ([lowerAccuracy isEqualToString:@"high"]) {
|
|
227
|
-
desiredAccuracy = RadarTrackingOptionsDesiredAccuracyHigh;
|
|
228
|
-
} else if ([lowerAccuracy isEqualToString:@"medium"]) {
|
|
229
|
-
desiredAccuracy = RadarTrackingOptionsDesiredAccuracyMedium;
|
|
230
|
-
} else if ([lowerAccuracy isEqualToString:@"low"]) {
|
|
231
|
-
desiredAccuracy = RadarTrackingOptionsDesiredAccuracyLow;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
222
|
if (location) {
|
|
236
223
|
[Radar trackOnceWithLocation:location completionHandler:completionHandler];
|
|
237
224
|
} else {
|
|
225
|
+
NSString *accuracy = optionsDict[@"desiredAccuracy"];
|
|
226
|
+
|
|
227
|
+
if (accuracy != nil && [accuracy isKindOfClass:[NSString class]]) {
|
|
228
|
+
NSString *lowerAccuracy = [accuracy lowercaseString];
|
|
229
|
+
if ([lowerAccuracy isEqualToString:@"high"]) {
|
|
230
|
+
desiredAccuracy = RadarTrackingOptionsDesiredAccuracyHigh;
|
|
231
|
+
} else if ([lowerAccuracy isEqualToString:@"medium"]) {
|
|
232
|
+
desiredAccuracy = RadarTrackingOptionsDesiredAccuracyMedium;
|
|
233
|
+
} else if ([lowerAccuracy isEqualToString:@"low"]) {
|
|
234
|
+
desiredAccuracy = RadarTrackingOptionsDesiredAccuracyLow;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
238
|
BOOL beacons = optionsDict[@"beacons"];
|
|
239
239
|
|
|
240
240
|
if (beacons) {
|
package/package.json
CHANGED