diff --git a/geolocator_android/CHANGELOG.md b/geolocator_android/CHANGELOG.md index 2252b527..643feb90 100644 --- a/geolocator_android/CHANGELOG.md +++ b/geolocator_android/CHANGELOG.md @@ -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. diff --git a/geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationManagerClient.java b/geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationManagerClient.java index a57054d1..c8b3e59a 100644 --- a/geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationManagerClient.java +++ b/geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationManagerClient.java @@ -181,6 +181,7 @@ public void startPositionUpdates( final LocationRequestCompat locationRequest = new LocationRequestCompat.Builder(timeInterval) .setMinUpdateDistanceMeters(distanceFilter) + .setMinUpdateIntervalMillis(timeInterval) .setQuality(quality) .build(); diff --git a/geolocator_android/pubspec.yaml b/geolocator_android/pubspec.yaml index 5b98eb57..62d51482 100644 --- a/geolocator_android/pubspec.yaml +++ b/geolocator_android/pubspec.yaml @@ -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"