react-native-geolocation icon indicating copy to clipboard operation
react-native-geolocation copied to clipboard

Default `auto` to Play Services location provider if available

Open jkaufman opened this issue 2 years ago • 2 comments

This PR reflects the one-line change proposed in #266

jkaufman avatar Jul 31 '23 15:07 jkaufman

#255 const getCurrentLocation = useCallback( (timeout = 3000, ignoreError = false) => { if (locationPermissionStatus !== LocationPermissionStatus.GRANTED) { return; }

  Geolocation.getCurrentPosition(
    (position) => {
      console.log('position', position);
      setCurrentLocation(position);
    },
    (error) => {
      console.log('error', error);
      if (ignoreError) {
        return;
      }
      setLocationPermissionStatus(LocationPermissionStatus.SERVICE_DENIED);
    },
    {
      enableHighAccuracy: true,
      timeout,
      maximumAge: 10000,
    },
  );
},
[locationPermissionStatus],

);

sunil2709 avatar Oct 13 '23 08:10 sunil2709

On the above comment given the follwing solution of the opened issue from your side, kindly update me when the isuue is closed.

sunil2709 avatar Oct 13 '23 08:10 sunil2709