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

[Feature Request]: Expose Location.hasBearingAccuracy() from Android platform

Open JaseElder opened this issue 1 year ago • 1 comments

Is there already an issue requesting this feature?

Please select affected platform(s)

  • [X] Android
  • [ ] iOS
  • [ ] Linux
  • [ ] macOS
  • [ ] Web
  • [ ] Windows

Use case

It would be nice to have the Android Location.hasBearingAccuracy() call exposed to Flutter, as we were filtering out inaccurate heading readings using Position.headingAccuracy, but on some devices this always = 0.0 if Location.hasBearingAccuracy() returns false, so on those devices, we're throwing away all readings.

Proposal

An extra field in geolocator_platform_interface-4.2.2/lib/src/models/position.dart to flag whether the device has bearing/heading accuracy available.

Specific requirements or considerations

No response

Additional information or context

No response

JaseElder avatar Jun 06 '24 16:06 JaseElder

Dear @JaseElder,

I'll label this as an enhancement, however, we will encourage you to propose a PR with the requested changes.

Kind regards,

TimHoogstrate avatar Jun 28 '24 08:06 TimHoogstrate