Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix LocationManager minUpdateIntervalMillis #1402

Conversation

vanelizarov
Copy link
Contributor

@vanelizarov vanelizarov commented Dec 31, 2023

getPositionStream causes an java.lang.IllegalStateException: passive location requests must have an explicit minimum update interval
The problem is that minUpdateIntervalMillis property in location request was implicitly set to -1 by default. So the fix is to set this property to the value of timeInterval like it is done in FusedLocationClient

Fixes #1401

Pre-launch Checklist

  • I made sure the project builds.
  • 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.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto main.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.

Copy link
Member

@mvanbeusekom mvanbeusekom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for providing this fix.

@mvanbeusekom mvanbeusekom merged commit ba015e6 into Baseflow:main Jan 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: getPositionStream causes exception when run on device without GMS (using default location manager)
2 participants