flutter-geolocator icon indicating copy to clipboard operation
flutter-geolocator copied to clipboard

[geolocator_android] Introduce option to force a specific location provider Issue/1171

Open jbxbergdev opened this issue 1 year ago • 2 comments

Added an option AndroidSettings.forceProvider that forces the plugin to use a specific provider out of the currently four available Android location providers. As discussed with @mvanbeusekom, this option is to be used in conjunction with forceLocationManager = true.

Example use case: An app needs to ensure locations are derived exclusively from GNSS and hence has to make sure no other sources like mobile networks are used.

#1171

Pre-launch Checklist

  • [x] I made sure the project builds.
  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [ ] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • [ ] I updated CHANGELOG.md to add a description of the change.
  • [x] I updated/added relevant documentation (doc comments with ///).
  • [x] I rebased onto main.
  • [x] I added new tests to check the change I am making, or this PR does not need tests.
  • [x] I made sure all existing and new tests are passing.
  • [x] I ran dart format . and committed any changes.
  • [ ] I ran flutter analyze and fixed any errors.

jbxbergdev avatar Nov 28 '24 16:11 jbxbergdev

@mvanbeusekom not really sure how to get rid of the analyzer errors the proper way. Please advise, thanks.

jbxbergdev avatar Nov 29 '24 15:11 jbxbergdev

@jbxbergdev,

Thanks for the contribution. I cannot see the build log anymore... Is it possible to rebase onto main and then we can have a look at the build logs. Maybe the analyser warnings are resolved recently.

Kind regards,

TimHoogstrate avatar Mar 20 '25 11:03 TimHoogstrate