From d337c26546410221a28f69120152e6ff521207ab Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Fri, 21 Nov 2025 12:52:39 +0000 Subject: [PATCH 1/2] docs: Android parameter for geolocation --- docs/apis/geolocation.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/apis/geolocation.md b/docs/apis/geolocation.md index d1ee8b82..27b7b41f 100644 --- a/docs/apis/geolocation.md +++ b/docs/apis/geolocation.md @@ -175,13 +175,14 @@ Not available on web. #### PositionOptions -| Prop | Type | Description | Default | Since | -| ---------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ----- | -| **`enableHighAccuracy`** | boolean | 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). | false | 1.0.0 | -| **`timeout`** | number | 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`. | 10000 | 1.0.0 | -| **`maximumAge`** | number | The maximum age in milliseconds of a possible cached position that is acceptable to return | 0 | 1.0.0 | -| **`minimumUpdateInterval`** | number | 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. | 5000 | 6.1.0 | -| **`enableLocationFallback`** | boolean | 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. | true | 8.0.0 | +| Prop | Type | Description | Default | Since | +| ---------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----- | +| **`enableHighAccuracy`** | boolean | 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). | false | 1.0.0 | +| **`timeout`** | number | The maximum wait time in milliseconds for location updates. | 10000 | 1.0.0 | +| **`maximumAge`** | number | The maximum age in milliseconds of a possible cached position that is acceptable to return | 0 | 1.0.0 | +| **`minimumUpdateInterval`** | number | The minumum update interval for `watchPosition`. Not to be confused with `interval`. 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. | 5000 | 6.1.0 | +| **`interval`** | number | Desired interval in milliseconds to receive location updates in `watchPosition`. For very low values of `interval` (a couple seconds or less), the platform may not guarantee timely location updates - they may take longer than specified. The platform may also be able to provide location updates faster than `interval`. You may use `minimumUpdateInterval` to control that behavior. For backwards compatiblity with version 7.1.x, if no value is passed, the default value of this parameter is that of `timeout`. This parameter is only available for Android. It has no effect on iOS or Web platforms. | `timeout` | 8.0.0 | +| **`enableLocationFallback`** | boolean | 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. This parameter is only available for Android. It has no effect on iOS or Web platforms. | true | 8.0.0 | #### ClearWatchOptions From 214bb23f0edb6dd28c5e5342b4dc203bcd53d261 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Fri, 21 Nov 2025 12:57:23 +0000 Subject: [PATCH 2/2] docs: Mention timeout changes for geolocation --- docs/main/updating/8-0.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/main/updating/8-0.md b/docs/main/updating/8-0.md index 582eaca2..27ca8476 100644 --- a/docs/main/updating/8-0.md +++ b/docs/main/updating/8-0.md @@ -197,6 +197,11 @@ The following plugin functionality has been modified or removed. Update your cod - `androidxExifInterfaceVersion` variable has been updated to `1.4.1`. - `androidxMaterialVersion` variable has been updated to `1.13.0`. +### Geolocation + +- `kotlinxCoroutinesVersion` variable has been updated to `1.10.2`. +- The `timeout` property now gets applied to all requests on Android on iOS, as opposed to just web and `getCurrentPosition` on Android. This aligns with what is documented in the plugin. If you start experiencing timeouts when requesting location in your app, consider using a higher `timeout` value. For `watchPosition` on Android, you may use the `interval` parameter introduced in version 8.0.0. +