Skip to content

[Bug]: Diffierent distanceFilter behavior between iOS and Android #1746

@CaviarChen

Description

@CaviarChen

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Steps to reproduce

Listen to location update with the default distanceFilter (i.e. 0)
Do not move the device (so the gpx coordinates doesn't change). You either need very good gps singnal or just use a simulator and set the location to a fix point.

Expected results

On both devices, we should be able to get continuous location updates.

Actual results

Only get this on Android, and on iOS you only get the first update.
I believe on iOS, distanceFilter = 0 actually means filtering out fix points.
Passing distanceFilter = -1 to iOS will get the same beahvior as Andorid with distanceFilter = 0.
Also one cannot pass distanceFilter = -1 on android becuase it will raise.

Code sample

Just using the example and set the distanceFilter.

Screenshots or video

No response

Version

14.0.2

Flutter Doctor output

Doctor output

I don't think this is related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions