@@ -18,6 +18,7 @@ public class LocationOptions {
18
18
private final double maximumAge ;
19
19
private final boolean showLocationDialog ;
20
20
private final boolean forceRequestLocation ;
21
+ private final boolean forceLocationManager ;
21
22
22
23
private LocationOptions (
23
24
LocationAccuracy accuracy ,
@@ -27,7 +28,8 @@ private LocationOptions(
27
28
long timeout ,
28
29
double maximumAge ,
29
30
boolean showLocationDialog ,
30
- boolean forceRequestLocation
31
+ boolean forceRequestLocation ,
32
+ boolean forceLocationManager
31
33
) {
32
34
this .accuracy = accuracy ;
33
35
this .interval = interval ;
@@ -37,6 +39,7 @@ private LocationOptions(
37
39
this .maximumAge = maximumAge ;
38
40
this .showLocationDialog = showLocationDialog ;
39
41
this .forceRequestLocation = forceRequestLocation ;
42
+ this .forceLocationManager = forceLocationManager ;
40
43
}
41
44
42
45
public static LocationOptions fromReadableMap (ReadableMap map ) {
@@ -60,7 +63,8 @@ public static LocationOptions fromReadableMap(ReadableMap map) {
60
63
!map .hasKey ("showLocationDialog" ) || map .getBoolean ("showLocationDialog" );
61
64
boolean forceRequestLocation =
62
65
map .hasKey ("forceRequestLocation" ) && map .getBoolean ("forceRequestLocation" );
63
-
66
+ boolean forceLocationManager =
67
+ map .hasKey ("forceLocationManager" ) && map .getBoolean ("forceLocationManager" );
64
68
65
69
return new LocationOptions (
66
70
accuracy ,
@@ -70,7 +74,8 @@ public static LocationOptions fromReadableMap(ReadableMap map) {
70
74
timeout ,
71
75
maximumAge ,
72
76
showLocationDialog ,
73
- forceRequestLocation
77
+ forceRequestLocation ,
78
+ forceLocationManager
74
79
);
75
80
}
76
81
@@ -106,6 +111,10 @@ public boolean isForceRequestLocation() {
106
111
return forceRequestLocation ;
107
112
}
108
113
114
+ public boolean isForceLocationManager () {
115
+ return forceLocationManager ;
116
+ }
117
+
109
118
/**
110
119
* Determine location priority from user provided accuracy level
111
120
*/
0 commit comments