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

auto always yields the Android location provider, not Play Services #266

Open
jkaufman opened this issue Jul 27, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@jkaufman
Copy link
Contributor

jkaufman commented Jul 27, 2023

Reviewing the code, it appears that the default location provider configuration setting, auto, always yields the Android location provider.

  • At GeolocationModule.java:37, mLocationManager is set to AndroidLocationManager.
  • When the configuration is set, onConfigurationChange checks for the values android and playServices, but auto is a no-op. As a consequence, the location manager remains android by default.

On line 54:

else if (Objects.equals(config.locationProvider, "playServices") && mLocationManager instanceof AndroidLocationManager)

… should probably read …

else if ((Objects.equals(config.locationProvider, "playServices") || Objects.equals(config.locationProvider, "auto")) && mLocationManager instanceof AndroidLocationManager)

@michalchudziak
Copy link
Owner

Hey, that's correct. I indeed wanted to keep the android.location backend default for 3.X release, to get the feedback from the community and resolve issues. I will change this behaviour in upcoming versions when it becomes stable enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants