Skip to content

Commit

Permalink
fix LocationManager minUpdateIntervalMillis (Baseflow#1402)
Browse files Browse the repository at this point in the history
* fix LocationManager `minUpdateIntervalMillis`

* bump version, update CHANGELOG
  • Loading branch information
vanelizarov authored Jan 15, 2024
1 parent 93b32f9 commit ba015e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions geolocator_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.4.1

* Fixes a bug where `getPositionStream` caused an `java.lang.IllegalStateException: passive location requests must have an explicit minimum update interval` because `minUpdateIntervalMillis` property in location request was set to -1 by default

## 4.4.0

- Adds `color` to `ForegroundNotificationConfig` to set the color of the notification icon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public void startPositionUpdates(

final LocationRequestCompat locationRequest = new LocationRequestCompat.Builder(timeInterval)
.setMinUpdateDistanceMeters(distanceFilter)
.setMinUpdateIntervalMillis(timeInterval)
.setQuality(quality)
.build();

Expand Down
2 changes: 1 addition & 1 deletion geolocator_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: geolocator_android
description: Geolocation plugin for Flutter. This plugin provides the Android implementation for the geolocator.
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_android
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
version: 4.4.0
version: 4.4.1

environment:
sdk: ">=2.15.0 <4.0.0"
Expand Down

0 comments on commit ba015e6

Please sign in to comment.