flutter-geolocator
flutter-geolocator copied to clipboard
Expose google location accuracy setting
:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)
It provides a new interface where users are able to check whether the "Google Location Accuracy" setting was enabled, when the Google Play Services are installed.
How do you update the versions of the interdependent subpackages? To develop locally I changed the pubspec to work with path references.... 🤔
:arrow_heading_down: What is the current behavior?
Every time the location is queried and the setting is disabled, a popup is shown to the user. This can make apps unusabled.
:new: What is the new behavior (if this is a feature change)?
Users can now check if the setting has been enabled or not and decided if they want to force the AndroidLocationManager
based on the result.
:boom: Does this PR introduce a breaking change?
No, it adds a new interface.
:bug: Recommendations for testing
:memo: Links to relevant issues/docs
Implements the suggestion from: https://github.com/Baseflow/flutter-geolocator/issues/667#issuecomment-779164266
:thinking: Checklist before submitting
- [x] I made sure all projects build.
- [x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
- [x] I updated CHANGELOG.md to add a description of the change.
- [x] I followed the style guide lines (code style guide).
- [x] I updated the relevant documentation.
- [x] I rebased onto current
master
.
Codecov Report
Merging #813 (860304f) into master (8c856de) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #813 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 1 18 +17
Lines 27 276 +249
==========================================
+ Hits 27 276 +249
Impacted Files | Coverage Δ | |
---|---|---|
geolocator/lib/geolocator.dart | 100.00% <100.00%> (ø) |
|
...terface/lib/src/geolocator_platform_interface.dart | 100.00% <100.00%> (ø) |
|
...src/implementations/method_channel_geolocator.dart | 100.00% <100.00%> (ø) |
|
...face/lib/src/errors/position_update_exception.dart | 100.00% <0.00%> (ø) |
|
...rors/permission_request_in_progress_exception.dart | 100.00% <0.00%> (ø) |
|
...ce/lib/src/errors/permission_denied_exception.dart | 100.00% <0.00%> (ø) |
|
...e/lib/src/errors/invalid_permission_exception.dart | 100.00% <0.00%> (ø) |
|
...or_platform_interface/lib/src/models/position.dart | 100.00% <0.00%> (ø) |
|
...orm_interface/lib/src/enums/location_accuracy.dart | 100.00% <0.00%> (ø) |
|
... and 10 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8c856de...860304f. Read the comment docs.
What's the current state of this PR. Is it likely to be merged?
Any news on this?
I did not get any feedback so far. By now the branch is pretty out of sync with master. We're currently working with a fork of this plugin... @mvanbeusekom is it worth updating this branch or is there no chance for this to ever get merged?
Hi @julianzur,
The geolocator supports the getLocationAccuracy()
method which will return the location accuracy information (either reduced
or precise
).
Platforms that don't support specific accuracy settings (Windows, Linux, Web but also Android without Google Play) will always return precise
.
I don't see how this PR would offer additional functionality over the already existing features. Please let me know if I am missing something.
This PR is open for a year now and I didn't follow development of the plugin closely (as I said we're on our own fork). If this feature already made it into master branch, we can close this PR. :) I just followed up on it since two people asked for it - and I was assuming that means it's not there yet.
Closing this PR in favor of already existing feature getLocationAccuracy()
.