Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default auto to Play Services location provider if available #267

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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