Skip to content

Default auto to Play Services location provider if available#267

Open
jkaufman wants to merge 1 commit intomichalchudziak:developfrom
jkaufman:bugfix/266-auto-always-yields-android-provider
Open

Default auto to Play Services location provider if available#267
jkaufman wants to merge 1 commit intomichalchudziak:developfrom
jkaufman:bugfix/266-auto-always-yields-android-provider

Conversation

@jkaufman
Copy link
Contributor

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

@sunil2709
Copy link

#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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants