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

Terrible accuracy - physial device Android 10, RN 0.6.4 #164

Open
yogesch opened this issue May 23, 2021 · 3 comments
Open

Terrible accuracy - physial device Android 10, RN 0.6.4 #164

yogesch opened this issue May 23, 2021 · 3 comments

Comments

@yogesch
Copy link

yogesch commented May 23, 2021

I seem to constantly get terrible accuracy. Even if I ask for fine, I get only coarse.

The physical device running Android 10 . Connected to computer via USB debugging. React Native version is 0.6.4.
The initial configuration is :

RNLocation.configure({
  distanceFilter: 10, 
  desiredAccuracy: {
    android: 'highAccuracy',
  },
  androidProvider: 'playServices',
  interval: 5000,
  maxWaitTime: 5000,
});

I get permissions like this:

 permission = await RNLocation.requestPermission({
        ios: 'always',
        android: {
          detail: 'fine',
          rationale: {
            title: 'We need to access your location',
            message: 'Your location is needed to check for stores in your area',
            buttonPositive: 'OK',
            buttonNegative: 'Cancel',
          },
        },
      });

And I get the location like this

 let location;
 location = await RNLocation.getLatestLocation({timeout: 2000});

I don't need to subscribe to location updates, just read it once on clicking a button.

When I check Google Maps, the location is perfect.

But on this, the accuracy value stuck around 2000

@yogesch
Copy link
Author

yogesch commented May 23, 2021

Basically, it only gets the coarse location, never the fine one.

@choukrus
Copy link

Hello, please did you find a good solution to have a better accuracy ?

@yogesch
Copy link
Author

yogesch commented Nov 18, 2021 via email

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

No branches or pull requests

2 participants