Yo guys,I'm using Geolocation from 'react-native-geolocation-service' library and the details are as follows. The problem I am facing is that android & iOS is returning the cached position. I have maximumAge set to 0, so it should never get any cached location and always get new location.Is there a way, an other approach, that I can always get the current location from the GPS in react native using this library? Any help is appreciated. Thanks.
NOTE:It's very hard to reproduce. This doesn't happen that often, but still occurs very few times.
export function getLocation(onSuccess: (position: GeoPosition) => void, onError?: (error: GeoError) => void) { Geolocation.getCurrentPosition(onSuccess, onError, { accuracy: { ios: 'hundredMeters' }, distanceFilter: 0, enableHighAccuracy: isAndroid, showLocationDialog: false, forceRequestLocation: true, }); }
This happens when asking for lokation in app