You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**`enableHighAccuracy`**| <code>boolean</code> | High accuracy mode (such as GPS, if available) On Android 12+ devices it will be ignored if users didn't grant ACCESS_FINE_LOCATION permissions (can be checked with location alias). | <code>false</code> | 1.0.0 |
173
-
|**`timeout`**| <code>number</code> | The maximum wait time in milliseconds for location updates. In Android, since version 7.1.0 of the plugin, it is also used to determine the interval of location updates for `watchPosition`. | <code>10000</code> | 1.0.0 |
174
-
|**`maximumAge`**| <code>number</code> | The maximum age in milliseconds of a possible cached position that is acceptable to return | <code>0</code> | 1.0.0 |
175
-
|**`minimumUpdateInterval`**| <code>number</code> | The minumum update interval for location updates. If location updates are available faster than this interval then an update will only occur if the minimum update interval has expired since the last location update. This parameter is only available for Android. It has no effect on iOS or Web platforms. | <code>5000</code> | 6.1.0 |
|**`enableHighAccuracy`**| <code>boolean</code> | High accuracy mode (such as GPS, if available) On Android 12+ devices it will be ignored if users didn't grant ACCESS_FINE_LOCATION permissions (can be checked with location alias). | <code>false</code> | 1.0.0 |
173
+
|**`timeout`**| <code>number</code> | The maximum wait time in milliseconds for location updates. In Android, since version 7.1.0 of the plugin, it is also used to determine the interval of location updates for `watchPosition`. | <code>10000</code> | 1.0.0 |
174
+
|**`maximumAge`**| <code>number</code> | The maximum age in milliseconds of a possible cached position that is acceptable to return | <code>0</code> | 1.0.0 |
175
+
|**`minimumUpdateInterval`**| <code>number</code> | The minumum update interval for location updates. If location updates are available faster than this interval then an update will only occur if the minimum update interval has expired since the last location update. This parameter is only available for Android. It has no effect on iOS or Web platforms. | <code>5000</code> | 6.1.0 |
176
+
|**`enableLocationFallback`**| <code>boolean</code> | This option applies to Android only. Whether to fall back to the Android framework's `LocationManager` in case Google Play Service's location settings checks fail. This can happen for multiple reasons - e.g. device has no Play Services or device has no network connection (Airplane Mode) If set to `false`, failures are propagated to the caller. Note that `LocationManager` may not be as effective as Google Play Services implementation. If the device's in airplane mode, only the GPS provider is used, which may take longer to return a location, depending on GPS signal. This means that to receive location in such circumstances, you may need to provide a higher timeout. | <code>true</code> | 8.0.0 |
176
177
177
178
178
179
#### ClearWatchOptions
@@ -244,3 +245,4 @@ The following table list all the plugin errors:
244
245
| OS-PLUG-GLOC-0014 | Android | Google Play Services error user resolvable. |
245
246
| OS-PLUG-GLOC-0015 | Android | Google Play Services error. |
|**`enableHighAccuracy`**| <code>boolean</code> | High accuracy mode (such as GPS, if available) On Android 12+ devices it will be ignored if users didn't grant ACCESS_FINE_LOCATION permissions (can be checked with location alias). | <code>false</code> | 1.0.0 |
173
-
|**`timeout`**| <code>number</code> | The maximum wait time in milliseconds for location updates. In Android, since version 7.1.0 of the plugin, it is also used to determine the interval of location updates for `watchPosition`. | <code>10000</code> | 1.0.0 |
174
-
|**`maximumAge`**| <code>number</code> | The maximum age in milliseconds of a possible cached position that is acceptable to return | <code>0</code> | 1.0.0 |
175
-
|**`minimumUpdateInterval`**| <code>number</code> | The minumum update interval for location updates. If location updates are available faster than this interval then an update will only occur if the minimum update interval has expired since the last location update. This parameter is only available for Android. It has no effect on iOS or Web platforms. | <code>5000</code> | 6.1.0 |
|**`enableHighAccuracy`**| <code>boolean</code> | High accuracy mode (such as GPS, if available) On Android 12+ devices it will be ignored if users didn't grant ACCESS_FINE_LOCATION permissions (can be checked with location alias). | <code>false</code> | 1.0.0 |
173
+
|**`timeout`**| <code>number</code> | The maximum wait time in milliseconds for location updates. In Android, since version 7.1.0 of the plugin, it is also used to determine the interval of location updates for `watchPosition`. | <code>10000</code> | 1.0.0 |
174
+
|**`maximumAge`**| <code>number</code> | The maximum age in milliseconds of a possible cached position that is acceptable to return | <code>0</code> | 1.0.0 |
175
+
|**`minimumUpdateInterval`**| <code>number</code> | The minumum update interval for location updates. If location updates are available faster than this interval then an update will only occur if the minimum update interval has expired since the last location update. This parameter is only available for Android. It has no effect on iOS or Web platforms. | <code>5000</code> | 6.1.0 |
176
+
|**`enableLocationFallback`**| <code>boolean</code> | This option applies to Android only. Whether to fall back to the Android framework's `LocationManager` in case Google Play Service's location settings checks fail. This can happen for multiple reasons - e.g. device has no Play Services or device has no network connection (Airplane Mode) If set to `false`, failures are propagated to the caller. Note that `LocationManager` may not be as effective as Google Play Services implementation. If the device's in airplane mode, only the GPS provider is used, which may take longer to return a location, depending on GPS signal. This means that to receive location in such circumstances, you may need to provide a higher timeout. | <code>true</code> | 8.0.0 |
176
177
177
178
178
179
#### ClearWatchOptions
@@ -244,3 +245,4 @@ The following table list all the plugin errors:
244
245
| OS-PLUG-GLOC-0014 | Android | Google Play Services error user resolvable. |
245
246
| OS-PLUG-GLOC-0015 | Android | Google Play Services error. |
Copy file name to clipboardExpand all lines: packages/capacitor-plugin/android/src/main/kotlin/com/capacitorjs/plugins/geolocation/GeolocationErrors.kt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -68,4 +68,9 @@ object GeolocationErrors {
68
68
code = formatErrorCode(16),
69
69
message ="Location settings error."
70
70
)
71
+
72
+
valNETWORK_LOCATION_DISABLED_ERROR=ErrorInfo(
73
+
code = formatErrorCode(17),
74
+
message ="Unable to retrieve location because device has both Network and Location turned off."
Copy file name to clipboardExpand all lines: packages/capacitor-plugin/android/src/main/kotlin/com/capacitorjs/plugins/geolocation/GeolocationPlugin.kt
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -54,11 +54,7 @@ class GeolocationPlugin : Plugin() {
0 commit comments