-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
forceLocationManager = true may still default to fused location #1171
Comments
Hi @jbxbergdev , Thank you for filing this issue and putting some time and trust into this plugin. Unfortunately I think you are a misguided by the naming of the different providers and classes. The Personally (I am unable to find information to back this up) I think the The I will close this issue for now, as I truly feel the current solution is correct. However I am open for more feedback since the Android documentation is not very clear on the differences. |
@mvanbeusekom the motivation behind my request was actually not the relation to Google Play services, but that my app needs to use location strictly from GNSS. Fused location also takes wifi and cellular networks into consideration. I don't want that. We used to use a fork of your repo, I'd be happy to submit a PR. |
Hi @jbxbergdev, That makes sense, however in that case I would prefer an option where the user can specify an explicit provider and not always use the Maybe we can add optional additional parameters to the If you could submit a PR that would be great. |
@mvanbeusekom @TimHoogstrate Could you have a look at my PR? |
When setting
forceLocationManager: true
inAndroidSettings
, geolocator may still request fused location provider.The reason:
LocationManagerClient
callsLocationManager.getBestProvider()
in order to get an appropriate location provider. This method may returnLocationManager.FUSED_PROVIDER
on certain devices (in my case Samsung A13, Android 12).There should be a way to force usage of
LocationManager.GPS_PROVIDER
if network location is not desired. Suggestion: Don't callLocationManager.getBestProvider()
, but always useLocationManager.GPS_PROVIDER
, whenforceLocationManager
is set totrue
.The text was updated successfully, but these errors were encountered: