`auto` always yields the Android location provider, not Play Services
jkaufman opened this issue · 2 comments
jkaufman commented
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 toAndroidLocationManager
. - When the configuration is set,
onConfigurationChange
checks for the valuesandroid
andplayServices
, butauto
is a no-op. As a consequence, the location manager remainsandroid
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 commented
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.