feat(android): New parameter interval in watchPosition#62
Merged
OS-pedrogustavobilro merged 5 commits intoNov 21, 2025
Conversation
Because we have "next" as `peerDependency` that causes pnpm install to fail `ERR_PNPM_INVALID_PEER_DEPENDENCY_SPECIFICATION The peerDependencies field named '@capacitor/core' of package '@capacitor/geolocation' has an invalid value: 'next'`
Because the native Android library now applies the `timeout` explicitly to `addWatch`, we should allow consumers of this plugin to configure interval's to be lower that timeout, while leaving default value of `timeout` for backwards compatibility with versio 7.1.x We document this as a breaking change, as it has the possibility of causing location timeouts where there previously were none. There was also an equivalent breaking change for iOS, in a previous PR. References: - https://outsystemsrd.atlassian.net/browse/RMET-4360 - https://outsystemsrd.atlassian.net/browse/RMET-4688 - #55 BREAKING CHANGE: 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 are 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.
OS-ruimoreiramendes
approved these changes
Nov 20, 2025
OS-ruimoreiramendes
left a comment
Contributor
There was a problem hiding this comment.
Tested the example app in this repo and tried to repeat the same tests we did on iOS a few days/weeks ago, and it seems to be working fine.
alexgerardojacinto
approved these changes
Nov 20, 2025
OS-pedrogustavobilro
added a commit
that referenced
this pull request
Nov 21, 2025
# [8.0.0-next.7](v8.0.0-next.6...v8.0.0-next.7) (2025-11-21) ### Features * **android:** New parameter `interval` in `watchPosition` ([#62](#62)) ([7fda0cf](7fda0cf)) ### BREAKING CHANGES * 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 are 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.
capacitor-bot
pushed a commit
that referenced
this pull request
Nov 26, 2025
# [8.0.0-next.6](v8.0.0-next.5...v8.0.0-next.6) (2025-11-26) ### Features * **android:** New parameter `interval` in `watchPosition` ([#62](#62)) ([7fda0cf](7fda0cf)) ### BREAKING CHANGES * **android:** 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 are 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.
capacitor-bot
pushed a commit
that referenced
this pull request
Dec 8, 2025
# [8.0.0](v7.1.6...v8.0.0) (2025-12-08) ### Bug Fixes * **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a)) * **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([#55](#55)) ([4c22ac3](4c22ac3)) * peerDependency for pnpm compatibility ([a94839d](a94839d)) ### Features * **android:** Fallback option for no network or Play Services ([#53](#53)) ([09277b7](09277b7)) * **android:** New parameter `interval` in `watchPosition` ([#62](#62)) ([7fda0cf](7fda0cf)) * Capacitor 8 support ([6ead26a](6ead26a)) ### BREAKING CHANGES * **android:** 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 are 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. * Capacitor major version update requires major version update on the plugin.
github-actions Bot
pushed a commit
to nitra/capacitor-geolocation
that referenced
this pull request
Jun 20, 2026
# 1.0.0 (2026-06-20) ### Bug Fixes * add missing callbacks when calling clearWatch ([be9b246](be9b246)) * Add play services location version for capacitor ([15170c2](15170c2)) * add returnType annotation to watchPosition function ([de2b2a5](de2b2a5)) * add success and error callbacks to clearWatch in outsystems-wrapper ([057ee1f](057ee1f)) * add watchId to options before calling watchPosition ([2fefd65](2fefd65)) * **android:** AGP 9.0 no longer supporting `proguard-android.txt` ([ionic-team#74](https://github.com/nitra/capacitor-geolocation/issues/74)) ([32961e1](32961e1)) * **android:** Only request permissions that are defined in the manifest ([ionic-team#85](https://github.com/nitra/capacitor-geolocation/issues/85)) ([c9c4c84](c9c4c84)) * **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([cb605d8](cb605d8)) * **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([75ffbd2](75ffbd2)) * **android:** Return error when user rejects request to turn on location with `enableLocationManagerFallback=true` ([ionic-team#86](https://github.com/nitra/capacitor-geolocation/issues/86)) ([1a2504a](1a2504a)) * **android:** update Gradle and Kotlin configurations for compatibility with latest @capacitor/android ([ionic-team#28](https://github.com/nitra/capacitor-geolocation/issues/28)) ([060d525](060d525)) * **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a)) * Capacitor plugin name on sample app ([4b18fc9](4b18fc9)) * Capacitor sample app name ([6d47cd0](6d47cd0)) * Capacitor sample app name and package ([e45a172](e45a172)) * Continue with @capacitor/geolocation ([164aa60](164aa60)) * convert position result for watchPosition like we do for getCurrentPosition ([a1490e8](a1490e8)) * convert position result for watchPosition like we do for getCurrentPosition ([ad8d264](ad8d264)) * coroutine scope lifecycle on cordova plugin ([719f87c](719f87c)) * correct iOS build scheme name in verify script ([48d41aa](48d41aa)) * correctly pass options to clearWatch ([54a138c](54a138c)) * correctly pass watchId to clearWatch ([741d72a](741d72a)) * correctly pass watchId to clearWatch ([6ee6dc8](6ee6dc8)) * directory for os-lib ([80d2eb5](80d2eb5)) * **docs:** improve formatting and clarity in README.md ([c08c8e3](c08c8e3)) * fix directories ([68da3e5](68da3e5)) * fix prefix format for error codes ([f947fa2](f947fa2)) * fix type of success callback ([ff2a4c6](ff2a4c6)) * fixing function name for `watchPosition` and `id field for clearWatch ([351b570](351b570)) * fixing iOS file name ([b3b4026](b3b4026)) * fixing iOS library name in plugin.xml ([eaaee59](eaaee59)) * fixing library name in Azure pipeline ([7bef749](7bef749)) * fixing typo in package ([a450280](a450280)) * include `watchId` in the parameters for `watchPosition in the cordova-plugin ([b39abe4](b39abe4)) * include `watchId` in the parameters for `watchPosition` in the cordova-plugin ([17f308a](17f308a)) * **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([ionic-team#55](https://github.com/nitra/capacitor-geolocation/issues/55)) ([4c22ac3](4c22ac3)) * **ios:** Allow publisher re-subscribe on location error ([8705ea8](8705ea8)) * **ios:** Allow publisher re-subscribe on location error ([960bfc4](960bfc4)) * **ios:** fixes an issue where the plugin stops receiving location updates after calling the clearWatch method ([ionic-team#38](https://github.com/nitra/capacitor-geolocation/issues/38)) ([d6f5266](d6f5266)) * **ios:** handle location watch callbacks recovery after backgrounding ([978bd50](978bd50)) * **ios:** resolving requestPermissions ([ionic-team#16](https://github.com/nitra/capacitor-geolocation/issues/16)) ([2586a9e](2586a9e)) * **ios:** Simplify SPM usage for native library ([ionic-team#52](https://github.com/nitra/capacitor-geolocation/issues/52)) ([ad53dc6](ad53dc6)) * **ios:** watchPosition after an error occurs ([f851818](f851818)) * **ios:** watchPosition after an error occurs ([749ca11](749ca11)) * local variable declarations ([f4b585f](f4b585f)) * make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([9b4a7c6](9b4a7c6)) * make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([d46adec](d46adec)) * match package.json description to match old plugin ([c942731](c942731)) * Missing permissions in android app ([cf5ff7c](cf5ff7c)) * Missing speed prop in sample app ([b30564f](b30564f)) * peerDependency for pnpm compatibility ([a94839d](a94839d)) * Podspec definition for ios plugin ([0e1706c](0e1706c)) * properly get parameters for getCurrentPosition ([4cdef94](4cdef94)) * Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([3dd0acf](3dd0acf)) * Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([fc287aa](fc287aa)) * remove files that do not exist (yet) ([4fda383](4fda383)) * restore timeout handling and options forwarding from upstream ([04b1ba2](04b1ba2)) * set keepCallback to true when returning position for `watchPosition ([423ccd7](423ccd7)) * set peerDependency on @capacitor/core to `>=7.0.0` to match current version of plugin ([ab7ea49](ab7ea49)) * typos and remove unnecessary callback ([2fcd073](2fcd073)) * Unit tests un-mocking ([3e24815](3e24815)) * Update android and ios OS version targets ([6580cde](6580cde)) * update IONGeolocationLib dependency and improve location handling in GeolocationPlugin ([d3d29b4](d3d29b4)) * update IONGeolocationLib dependency version constraint to allow newer versions ([ab34684](ab34684)) * update location service methods to include options for improved functionality ([488b57d](488b57d)) * update repository URL in package.json and add id-token permission in release workflow ([c2d497e](c2d497e)) * update test gradle dependencies ([551660d](551660d)) * Urls on capacitor plugin's `package.json` ([5e95952](5e95952)) * use `position.altitudeAccuracy ([e35bc43](e35bc43)) * use correct const variable ([324cf12](324cf12)) * use plugin.xml as standard file, not link ([c02588c](c02588c)) ### Features * add altitudeAccuracy to result ([c2a5749](c2a5749)) * add altitudeAccuracy to result ([0a44a66](0a44a66)) * add barebones implementation of Android Capacitor Bridge ([e7146d3](e7146d3)) * add barebones implementation of Android Cordova Bridge ([a7c7a7d](a7c7a7d)) * add cordova and capacitor bridge methods ([43487c5](43487c5)) * add implementation for Capacitor bridge ([6a8f6f4](6a8f6f4)) * add outsystems javascript wrapper for both capacitor and cordova plugins ([fc11136](fc11136)) * add permission request to Cordova bridge ([9c5a05b](9c5a05b)) * add support for heading ([ionic-team#78](https://github.com/nitra/capacitor-geolocation/issues/78)) ([ed20f3e](ed20f3e)) * add wrapper as a package ([2a99be8](2a99be8)) * addWatch+clearWatch for Android cordova bridge ([d6fe8bb](d6fe8bb)) * **android:** Fallback option for no network or Play Services ([ionic-team#53](https://github.com/nitra/capacitor-geolocation/issues/53)) ([09277b7](09277b7)) * **android:** New parameter `interval` in `watchPosition` ([ionic-team#62](https://github.com/nitra/capacitor-geolocation/issues/62)) ([7fda0cf](7fda0cf)) * cap sample app watches and clear watch ([5934095](5934095)) * Capacitor 8 support ([6ead26a](6ead26a)) * **capacitor:** add pwa code ([8340740](8340740)) * **capacitor:** add pwa getCurrentPosition ([02e5c0a](02e5c0a)) * **ci:** add Maven Central publishing workflow and Android publishing scripts ([ionic-team#72](https://github.com/nitra/capacitor-geolocation/issues/72)) ([281d64f](281d64f)) * **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#70](https://github.com/nitra/capacitor-geolocation/issues/70)) ([e2387f4](e2387f4)) * **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#71](https://github.com/nitra/capacitor-geolocation/issues/71)) ([f9a4eca](f9a4eca)) * configura Kotlin version for Capacitor Plugin ([48b0cc2](48b0cc2)) * convert JSON result for format needed for Capacitor bridge ([8a36084](8a36084)) * enhance location string representation with isMock and provider details ([4ae9d54](4ae9d54)) * finish getLocation implementation on library ([6637f74](6637f74)) * first implementation of `getLocation ([abb24a7](abb24a7)) * get watchId from args ([3b72a49](3b72a49)) * implement addWatch and clearWatch on Capacitor bridge ([a5a2ebf](a5a2ebf)) * Implement addWatch+clearWatch for native Android ([1d4d426](1d4d426)) * Initial location example app code ([3363e74](3363e74)) * initial version for sample app watches ([a829efb](a829efb)) * properly handle error scenarios in Capacitor bridge and remove unused sealed class ([fe28149](fe28149)) * properly handle error scenarios in Cordova bridge ([1da1205](1da1205)) * request permissions before getting location ([fe32351](fe32351)) * update dependency to OSGeolocationLib-Android in Cordova and Capacitor plugin, and remove local Android lib ([bb9b86d](bb9b86d)) * Update plugin name ([9948a41](9948a41)) ### BREAKING CHANGES * **android:** 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 are 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. * Capacitor major version update requires major version update on the plugin.
github-actions Bot
pushed a commit
to nitra/capacitor-geolocation
that referenced
this pull request
Jun 23, 2026
# 1.0.0 (2026-06-23) ### Bug Fixes * add missing callbacks when calling clearWatch ([be9b246](be9b246)) * Add play services location version for capacitor ([15170c2](15170c2)) * add returnType annotation to watchPosition function ([de2b2a5](de2b2a5)) * add success and error callbacks to clearWatch in outsystems-wrapper ([057ee1f](057ee1f)) * add watchId to options before calling watchPosition ([2fefd65](2fefd65)) * **android:** AGP 9.0 no longer supporting `proguard-android.txt` ([ionic-team#74](https://github.com/nitra/capacitor-geolocation/issues/74)) ([32961e1](32961e1)) * **android:** Only request permissions that are defined in the manifest ([ionic-team#85](https://github.com/nitra/capacitor-geolocation/issues/85)) ([c9c4c84](c9c4c84)) * **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([cb605d8](cb605d8)) * **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([75ffbd2](75ffbd2)) * **android:** Return error when user rejects request to turn on location with `enableLocationManagerFallback=true` ([ionic-team#86](https://github.com/nitra/capacitor-geolocation/issues/86)) ([1a2504a](1a2504a)) * **android:** update Gradle and Kotlin configurations for compatibility with latest @capacitor/android ([ionic-team#28](https://github.com/nitra/capacitor-geolocation/issues/28)) ([060d525](060d525)) * **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a)) * Capacitor plugin name on sample app ([4b18fc9](4b18fc9)) * Capacitor sample app name ([6d47cd0](6d47cd0)) * Capacitor sample app name and package ([e45a172](e45a172)) * Continue with @capacitor/geolocation ([164aa60](164aa60)) * convert position result for watchPosition like we do for getCurrentPosition ([a1490e8](a1490e8)) * convert position result for watchPosition like we do for getCurrentPosition ([ad8d264](ad8d264)) * coroutine scope lifecycle on cordova plugin ([719f87c](719f87c)) * correct iOS build scheme name in verify script ([48d41aa](48d41aa)) * correctly pass options to clearWatch ([54a138c](54a138c)) * correctly pass watchId to clearWatch ([741d72a](741d72a)) * correctly pass watchId to clearWatch ([6ee6dc8](6ee6dc8)) * directory for os-lib ([80d2eb5](80d2eb5)) * **docs:** improve formatting and clarity in README.md ([c08c8e3](c08c8e3)) * fix directories ([68da3e5](68da3e5)) * fix prefix format for error codes ([f947fa2](f947fa2)) * fix type of success callback ([ff2a4c6](ff2a4c6)) * fixing function name for `watchPosition` and `id field for clearWatch ([351b570](351b570)) * fixing iOS file name ([b3b4026](b3b4026)) * fixing iOS library name in plugin.xml ([eaaee59](eaaee59)) * fixing library name in Azure pipeline ([7bef749](7bef749)) * fixing typo in package ([a450280](a450280)) * include `watchId` in the parameters for `watchPosition in the cordova-plugin ([b39abe4](b39abe4)) * include `watchId` in the parameters for `watchPosition` in the cordova-plugin ([17f308a](17f308a)) * **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([ionic-team#55](https://github.com/nitra/capacitor-geolocation/issues/55)) ([4c22ac3](4c22ac3)) * **ios:** Allow publisher re-subscribe on location error ([8705ea8](8705ea8)) * **ios:** Allow publisher re-subscribe on location error ([960bfc4](960bfc4)) * **ios:** atlas-pro[#7380](https://github.com/nitra/capacitor-geolocation/issues/7380) rename SPM package to NitraGeolocation ([a1049ca](a1049ca)) * **ios:** fixes an issue where the plugin stops receiving location updates after calling the clearWatch method ([ionic-team#38](https://github.com/nitra/capacitor-geolocation/issues/38)) ([d6f5266](d6f5266)) * **ios:** handle location watch callbacks recovery after backgrounding ([978bd50](978bd50)) * **ios:** resolving requestPermissions ([ionic-team#16](https://github.com/nitra/capacitor-geolocation/issues/16)) ([2586a9e](2586a9e)) * **ios:** Simplify SPM usage for native library ([ionic-team#52](https://github.com/nitra/capacitor-geolocation/issues/52)) ([ad53dc6](ad53dc6)) * **ios:** watchPosition after an error occurs ([f851818](f851818)) * **ios:** watchPosition after an error occurs ([749ca11](749ca11)) * local variable declarations ([f4b585f](f4b585f)) * make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([9b4a7c6](9b4a7c6)) * make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([d46adec](d46adec)) * match package.json description to match old plugin ([c942731](c942731)) * Missing permissions in android app ([cf5ff7c](cf5ff7c)) * Missing speed prop in sample app ([b30564f](b30564f)) * peerDependency for pnpm compatibility ([a94839d](a94839d)) * Podspec definition for ios plugin ([0e1706c](0e1706c)) * properly get parameters for getCurrentPosition ([4cdef94](4cdef94)) * Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([3dd0acf](3dd0acf)) * Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([fc287aa](fc287aa)) * remove files that do not exist (yet) ([4fda383](4fda383)) * restore timeout handling and options forwarding from upstream ([04b1ba2](04b1ba2)) * set keepCallback to true when returning position for `watchPosition ([423ccd7](423ccd7)) * set peerDependency on @capacitor/core to `>=7.0.0` to match current version of plugin ([ab7ea49](ab7ea49)) * typos and remove unnecessary callback ([2fcd073](2fcd073)) * Unit tests un-mocking ([3e24815](3e24815)) * Update android and ios OS version targets ([6580cde](6580cde)) * update IONGeolocationLib dependency and improve location handling in GeolocationPlugin ([d3d29b4](d3d29b4)) * update IONGeolocationLib dependency version constraint to allow newer versions ([ab34684](ab34684)) * update location service methods to include options for improved functionality ([488b57d](488b57d)) * update repository URL in package.json and add id-token permission in release workflow ([c2d497e](c2d497e)) * update test gradle dependencies ([551660d](551660d)) * Urls on capacitor plugin's `package.json` ([5e95952](5e95952)) * use `position.altitudeAccuracy ([e35bc43](e35bc43)) * use correct const variable ([324cf12](324cf12)) * use plugin.xml as standard file, not link ([c02588c](c02588c)) ### Features * add altitudeAccuracy to result ([c2a5749](c2a5749)) * add altitudeAccuracy to result ([0a44a66](0a44a66)) * add barebones implementation of Android Capacitor Bridge ([e7146d3](e7146d3)) * add barebones implementation of Android Cordova Bridge ([a7c7a7d](a7c7a7d)) * add cordova and capacitor bridge methods ([43487c5](43487c5)) * add implementation for Capacitor bridge ([6a8f6f4](6a8f6f4)) * add outsystems javascript wrapper for both capacitor and cordova plugins ([fc11136](fc11136)) * add permission request to Cordova bridge ([9c5a05b](9c5a05b)) * add support for heading ([ionic-team#78](https://github.com/nitra/capacitor-geolocation/issues/78)) ([ed20f3e](ed20f3e)) * add wrapper as a package ([2a99be8](2a99be8)) * addWatch+clearWatch for Android cordova bridge ([d6fe8bb](d6fe8bb)) * **android:** Fallback option for no network or Play Services ([ionic-team#53](https://github.com/nitra/capacitor-geolocation/issues/53)) ([09277b7](09277b7)) * **android:** New parameter `interval` in `watchPosition` ([ionic-team#62](https://github.com/nitra/capacitor-geolocation/issues/62)) ([7fda0cf](7fda0cf)) * cap sample app watches and clear watch ([5934095](5934095)) * Capacitor 8 support ([6ead26a](6ead26a)) * **capacitor:** add pwa code ([8340740](8340740)) * **capacitor:** add pwa getCurrentPosition ([02e5c0a](02e5c0a)) * **ci:** add Maven Central publishing workflow and Android publishing scripts ([ionic-team#72](https://github.com/nitra/capacitor-geolocation/issues/72)) ([281d64f](281d64f)) * **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#70](https://github.com/nitra/capacitor-geolocation/issues/70)) ([e2387f4](e2387f4)) * **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#71](https://github.com/nitra/capacitor-geolocation/issues/71)) ([f9a4eca](f9a4eca)) * configura Kotlin version for Capacitor Plugin ([48b0cc2](48b0cc2)) * convert JSON result for format needed for Capacitor bridge ([8a36084](8a36084)) * enhance location string representation with isMock and provider details ([4ae9d54](4ae9d54)) * finish getLocation implementation on library ([6637f74](6637f74)) * first implementation of `getLocation ([abb24a7](abb24a7)) * get watchId from args ([3b72a49](3b72a49)) * implement addWatch and clearWatch on Capacitor bridge ([a5a2ebf](a5a2ebf)) * Implement addWatch+clearWatch for native Android ([1d4d426](1d4d426)) * Initial location example app code ([3363e74](3363e74)) * initial version for sample app watches ([a829efb](a829efb)) * properly handle error scenarios in Capacitor bridge and remove unused sealed class ([fe28149](fe28149)) * properly handle error scenarios in Cordova bridge ([1da1205](1da1205)) * request permissions before getting location ([fe32351](fe32351)) * update dependency to OSGeolocationLib-Android in Cordova and Capacitor plugin, and remove local Android lib ([bb9b86d](bb9b86d)) * Update plugin name ([9948a41](9948a41)) ### BREAKING CHANGES * **android:** 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 are 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. * Capacitor major version update requires major version update on the plugin.
github-actions Bot
pushed a commit
to nitra/capacitor-geolocation
that referenced
this pull request
Jun 23, 2026
# 1.0.0 (2026-06-23) ### Bug Fixes * add missing callbacks when calling clearWatch ([be9b246](be9b246)) * Add play services location version for capacitor ([15170c2](15170c2)) * add returnType annotation to watchPosition function ([de2b2a5](de2b2a5)) * add success and error callbacks to clearWatch in outsystems-wrapper ([057ee1f](057ee1f)) * add watchId to options before calling watchPosition ([2fefd65](2fefd65)) * **android:** AGP 9.0 no longer supporting `proguard-android.txt` ([ionic-team#74](https://github.com/nitra/capacitor-geolocation/issues/74)) ([32961e1](32961e1)) * **android:** Only request permissions that are defined in the manifest ([ionic-team#85](https://github.com/nitra/capacitor-geolocation/issues/85)) ([c9c4c84](c9c4c84)) * **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([cb605d8](cb605d8)) * **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([75ffbd2](75ffbd2)) * **android:** Return error when user rejects request to turn on location with `enableLocationManagerFallback=true` ([ionic-team#86](https://github.com/nitra/capacitor-geolocation/issues/86)) ([1a2504a](1a2504a)) * **android:** update Gradle and Kotlin configurations for compatibility with latest @capacitor/android ([ionic-team#28](https://github.com/nitra/capacitor-geolocation/issues/28)) ([060d525](060d525)) * **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a)) * Capacitor plugin name on sample app ([4b18fc9](4b18fc9)) * Capacitor sample app name ([6d47cd0](6d47cd0)) * Capacitor sample app name and package ([e45a172](e45a172)) * Continue with @capacitor/geolocation ([164aa60](164aa60)) * convert position result for watchPosition like we do for getCurrentPosition ([a1490e8](a1490e8)) * convert position result for watchPosition like we do for getCurrentPosition ([ad8d264](ad8d264)) * coroutine scope lifecycle on cordova plugin ([719f87c](719f87c)) * correct iOS build scheme name in verify script ([48d41aa](48d41aa)) * correctly pass options to clearWatch ([54a138c](54a138c)) * correctly pass watchId to clearWatch ([741d72a](741d72a)) * correctly pass watchId to clearWatch ([6ee6dc8](6ee6dc8)) * directory for os-lib ([80d2eb5](80d2eb5)) * **docs:** improve formatting and clarity in README.md ([c08c8e3](c08c8e3)) * fix directories ([68da3e5](68da3e5)) * fix prefix format for error codes ([f947fa2](f947fa2)) * fix type of success callback ([ff2a4c6](ff2a4c6)) * fixing function name for `watchPosition` and `id field for clearWatch ([351b570](351b570)) * fixing iOS file name ([b3b4026](b3b4026)) * fixing iOS library name in plugin.xml ([eaaee59](eaaee59)) * fixing library name in Azure pipeline ([7bef749](7bef749)) * fixing typo in package ([a450280](a450280)) * include `watchId` in the parameters for `watchPosition in the cordova-plugin ([b39abe4](b39abe4)) * include `watchId` in the parameters for `watchPosition` in the cordova-plugin ([17f308a](17f308a)) * **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([ionic-team#55](https://github.com/nitra/capacitor-geolocation/issues/55)) ([4c22ac3](4c22ac3)) * **ios:** Allow publisher re-subscribe on location error ([8705ea8](8705ea8)) * **ios:** Allow publisher re-subscribe on location error ([960bfc4](960bfc4)) * **ios:** atlas-pro[#7380](https://github.com/nitra/capacitor-geolocation/issues/7380) rename SPM package to NitraGeolocation ([a1049ca](a1049ca)) * **ios:** fixes an issue where the plugin stops receiving location updates after calling the clearWatch method ([ionic-team#38](https://github.com/nitra/capacitor-geolocation/issues/38)) ([d6f5266](d6f5266)) * **ios:** handle location watch callbacks recovery after backgrounding ([978bd50](978bd50)) * **ios:** resolving requestPermissions ([ionic-team#16](https://github.com/nitra/capacitor-geolocation/issues/16)) ([2586a9e](2586a9e)) * **ios:** Simplify SPM usage for native library ([ionic-team#52](https://github.com/nitra/capacitor-geolocation/issues/52)) ([ad53dc6](ad53dc6)) * **ios:** watchPosition after an error occurs ([f851818](f851818)) * **ios:** watchPosition after an error occurs ([749ca11](749ca11)) * local variable declarations ([f4b585f](f4b585f)) * make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([9b4a7c6](9b4a7c6)) * make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([d46adec](d46adec)) * match package.json description to match old plugin ([c942731](c942731)) * Missing permissions in android app ([cf5ff7c](cf5ff7c)) * Missing speed prop in sample app ([b30564f](b30564f)) * peerDependency for pnpm compatibility ([a94839d](a94839d)) * Podspec definition for ios plugin ([0e1706c](0e1706c)) * properly get parameters for getCurrentPosition ([4cdef94](4cdef94)) * Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([3dd0acf](3dd0acf)) * Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([fc287aa](fc287aa)) * remove files that do not exist (yet) ([4fda383](4fda383)) * restore timeout handling and options forwarding from upstream ([04b1ba2](04b1ba2)) * set keepCallback to true when returning position for `watchPosition ([423ccd7](423ccd7)) * set peerDependency on @capacitor/core to `>=7.0.0` to match current version of plugin ([ab7ea49](ab7ea49)) * typos and remove unnecessary callback ([2fcd073](2fcd073)) * Unit tests un-mocking ([3e24815](3e24815)) * Update android and ios OS version targets ([6580cde](6580cde)) * update IONGeolocationLib dependency and improve location handling in GeolocationPlugin ([d3d29b4](d3d29b4)) * update IONGeolocationLib dependency version constraint to allow newer versions ([ab34684](ab34684)) * update location service methods to include options for improved functionality ([488b57d](488b57d)) * update repository URL in package.json and add id-token permission in release workflow ([c2d497e](c2d497e)) * update test gradle dependencies ([551660d](551660d)) * Urls on capacitor plugin's `package.json` ([5e95952](5e95952)) * use `position.altitudeAccuracy ([e35bc43](e35bc43)) * use correct const variable ([324cf12](324cf12)) * use plugin.xml as standard file, not link ([c02588c](c02588c)) ### Features * add altitudeAccuracy to result ([c2a5749](c2a5749)) * add altitudeAccuracy to result ([0a44a66](0a44a66)) * add barebones implementation of Android Capacitor Bridge ([e7146d3](e7146d3)) * add barebones implementation of Android Cordova Bridge ([a7c7a7d](a7c7a7d)) * add cordova and capacitor bridge methods ([43487c5](43487c5)) * add implementation for Capacitor bridge ([6a8f6f4](6a8f6f4)) * add outsystems javascript wrapper for both capacitor and cordova plugins ([fc11136](fc11136)) * add permission request to Cordova bridge ([9c5a05b](9c5a05b)) * add support for heading ([ionic-team#78](https://github.com/nitra/capacitor-geolocation/issues/78)) ([ed20f3e](ed20f3e)) * add wrapper as a package ([2a99be8](2a99be8)) * addWatch+clearWatch for Android cordova bridge ([d6fe8bb](d6fe8bb)) * **android:** Fallback option for no network or Play Services ([ionic-team#53](https://github.com/nitra/capacitor-geolocation/issues/53)) ([09277b7](09277b7)) * **android:** New parameter `interval` in `watchPosition` ([ionic-team#62](https://github.com/nitra/capacitor-geolocation/issues/62)) ([7fda0cf](7fda0cf)) * cap sample app watches and clear watch ([5934095](5934095)) * Capacitor 8 support ([6ead26a](6ead26a)) * **capacitor:** add pwa code ([8340740](8340740)) * **capacitor:** add pwa getCurrentPosition ([02e5c0a](02e5c0a)) * **ci:** add Maven Central publishing workflow and Android publishing scripts ([ionic-team#72](https://github.com/nitra/capacitor-geolocation/issues/72)) ([281d64f](281d64f)) * **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#70](https://github.com/nitra/capacitor-geolocation/issues/70)) ([e2387f4](e2387f4)) * **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#71](https://github.com/nitra/capacitor-geolocation/issues/71)) ([f9a4eca](f9a4eca)) * configura Kotlin version for Capacitor Plugin ([48b0cc2](48b0cc2)) * convert JSON result for format needed for Capacitor bridge ([8a36084](8a36084)) * enhance location string representation with isMock and provider details ([4ae9d54](4ae9d54)) * finish getLocation implementation on library ([6637f74](6637f74)) * first implementation of `getLocation ([abb24a7](abb24a7)) * get watchId from args ([3b72a49](3b72a49)) * implement addWatch and clearWatch on Capacitor bridge ([a5a2ebf](a5a2ebf)) * Implement addWatch+clearWatch for native Android ([1d4d426](1d4d426)) * Initial location example app code ([3363e74](3363e74)) * initial version for sample app watches ([a829efb](a829efb)) * properly handle error scenarios in Capacitor bridge and remove unused sealed class ([fe28149](fe28149)) * properly handle error scenarios in Cordova bridge ([1da1205](1da1205)) * request permissions before getting location ([fe32351](fe32351)) * update dependency to OSGeolocationLib-Android in Cordova and Capacitor plugin, and remove local Android lib ([bb9b86d](bb9b86d)) * Update plugin name ([9948a41](9948a41)) ### BREAKING CHANGES * **android:** 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 are 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. * Capacitor major version update requires major version update on the plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new parameter
intervaltowatchPositionin Android, to allow configuring specific intervals in which to receive location updates.In version 7.1.x of the plugin,
timeoutwas used for this purpose, which, even if documented, is prone to confusion.. Now we are applying thetimeoutparameter for its original purpose - to give a timeout error if a location isn't returned until the specifiedtimeoutvalue. This is implemented in the latest version of our Geolocation android native library (2.1.0).To maintain backwards compatibility with versions 7.1.x, the default value of
intervalis that oftimeout. Users should explicitly provide a different value (possibly lower thantimeout) if they want to.This is technically a breaking change (or has the potential to break client apps), as detailed below in this PR description.
This PR also contains updates the lockfiles to be npm instead of pnpm in this repo, because we have configured
nextpeerDependency which does not work with pnpm.Context
Type of changes
BREAKING CHANGE: The
timeoutproperty now gets applied to all requests on Android on iOS, as opposed to just web andgetCurrentPositionon Android. This aligns with what is documented in the plugin. If you are experiencing timeouts when requesting location in your app, consider using a highertimeoutvalue. ForwatchPositionon Android, you may use theintervalparameter introduced in version 8.0.0.Platforms affected
Tests
Use the example app in this repository to test - has a field for the new
intervalparameter.