react-native -v): 0.57.5NA
NA
NA
According to your docs (https://transistorsoft.github.io/react-native-background-geolocation/interfaces/_react_native_background_geolocation_.config.html#desiredaccuracy) there are several possible values of desiredAccuracy,but I can't see GPS only option
Is it possible to set desiredAccuracy as GPS only ?
I want location from GPS only, not from Wi-Fi or Cellular, because perhaps there is certain amount of inaccuracy (bounce rate) when location is fetched from Cellular/Wi-Fi
NA
No, it's not possible. This is handled purely by the operating system. The only way to use GPS is DESIRED_ACCURACY_HIGH / DESIRED_ACCURACY_NAVIGATION.
If you're outdoors, generally GPS will be used.
If you're indoors, GPS is impossible. Wifi will likely be used.
Otherwise, cell tower.
Btw, customers should post issues to the private repo. There's no guarantee of priority support in the public repo.
The reason I post issues in public repo is that I have installed react-native-background-geolocation as npm dependency, not react-native-background-geolocation-android
Secondly there is a setting in Android Devices,where we can set Locating Method to GPS only. Will setting it solve my purpose ?
The reason I post issues in public repo is that I have installed
The public npm version is only updated about every 3 months. Nevertheless, if you want prompt attention to your issues, post to the private repo. It doesn't matter if you install the plugin from private repo or not.
Secondly there is a setting in Android Devices,where we can set Locating Method to GPS only. Will setting it solve my purpose ?
Don't do that. You won't get locations when you're indoors. The native location API will use the best possible source of location. When you're outdoors, that will be GPS.
Also, if you're using geofences, they won't work with GPS only.
I know that GPS doesn't work indoors but it's fine with my use case,As getting no location at all is better than getting even slightly inaccurate location per my use case. My app won't be used indoors
Secondly there is a parameter speed which is returned -1 when location isn't returned from GPS,
Refer https://transistorsoft.github.io/react-native-background-geolocation/interfaces/_react_native_background_geolocation_.coords.html#speed
Is that a reliable check to see whether the location was returned from GPS or not ? If speed is -1, I will not enter that location coordinates in my database
<= 10 meters.40-60 meters.And what about cellular accuracy ?
>= 1000 metersSo that means GPS is the most reliable Location Provider among all three,That is why I want location from GPS only, not from other providers. Anyhow Thanks !
When the device connected to those gps satellites in space, those locations will be used. Otherwise, the next most accurate location will be provided. This all happens deep inside the Android location api.