Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230092

Capacitor Geolocation GetCurrentPosition not pulling position every call

$
0
0

Is your device set to “high accuracy mode” when testing?

We are using LocationManager.getLastKnownLocation() on Android and CLLocationManager locations on iOS, both of which cache the last known location, which the OS updates periodically. Unlike the web implementation, the way we are doing just requests the cache to update more quickly and doesn’t invalidate the cache like the web implementation. You should use the watch mode to continuously poll when users enter the “map mode” to get more accurate location data. The geolocation plugin uses the standards on iOS and Android but if you need more immediate location data, you can prompt it via a custom plugin.

You could also open a feature request on the Capacitor Plugins repo and request that our request to the OS is a lower amount.


Viewing all articles
Browse latest Browse all 230092

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>