transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.66k stars 426 forks source link

[Question] Location Provider #1782

Closed judeProground closed 1 year ago

judeProground commented 1 year ago

Your Environment

Expected Behavior

I am a developer working on a speed tracking app using this library. I have some questions regarding the app's features, so I'd like to inquire:

  1. In "@react-native-community/geolocation," I see that for the location provider option, you can choose between 'playServices' and 'android.' Do you have any plans to support a feature that allows such selection? Some users prefer the speed provided by the simple Android Location API over the speed offered by Google's Fused Location Provider, as it is more stable and accurate in certain cases. Therefore, I would like to provide users with the ability to choose a location provider, similar to what the GPS Status & Toolbox app on the Play Store offers.

  2. Or, if a user uses the app with the [Android Settings -> Location -> Location Services -> Google Location Accuracy] turned off, would there be any difference in the information obtained using the GPS provider from the Location API?

  3. I apologize for mentioning another app, but in GPS Status & Toolbox, they integrate a third-party developed DDK nav with DDK positioning to provide DDK functionality as a location provider. I don't know much about it myself, but I believe various advanced features are provided for more sophisticated location information. I thought it would be great if these features could also be incorporated into your library.

Thank you.

Actual Behavior

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ```
christocracy commented 1 year ago

Do you have any plans to support a feature that allows such selection?

No. I've been using FusedLocationProvider for over 8 years with this plugin. I see no need to use the standard Location api.

Some users prefer the speed provided by the simple Android Location API over the speed offered by Google's Fused Location Provider

There is nothing magical about the play-services FusedLocationProvider API. It merely simplifies fetching locations by automatically selecting the best possible location from all 3 available providers on the device (Cellular, Network and GPS). When one doesn't use play-services FusedLocationProvider API, you merely do all that switching yourself, which is a pain-in-the-ass:

When outdoors (GPS only works outdoors), the location provided by FusedLocationProvider ultimately come from the standard Location API, whose data is ultimately provided by the GPS chip on the device.

I see nothing wrong with the accuracy of locations I receive. Here's the few days worth of bike-riding on four of my Android test devices:

PIxel 6 @ 14

pixel6

Pixel 3a @ 12

pixel3a

Samsung Galaxy S20 @ 13

samsung-s20

OnePlus A5010 @ 9

OnePlus

As for accuracy, I see 4-8 meters from GPS typically.

Screenshot 2023-08-14 at 9 52 14 AM

Or, if a user uses the app with the [Android Settings -> Location -> Location Services -> Google Location Accuracy] turned off, would there be any difference in the information obtained using the GPS provider from the Location API?

I have no idea.

This "DDK" company (I've never heard of it) seems to deal with the Iridium Satellite Network, which isn't going to be free. You'd have to pay for that service.

Screenshot 2023-08-14 at 10 15 32 AM
judeProground commented 1 year ago

Thank you so much for your response :)