geolocator 5.2.0 geolocator: ^5.2.0 copied to clipboard
Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions.
- iOS: keep trying to get the location when a
kCLErrorLocationUnknowerror is received (as per Apple's documentation);
- Android: synchronize gradle versions with current stable version of Flutter (1.12.13+hotfix.5).
- Android: Fixes bug where latitude and longitude are not returned as part of the placemark (thanks to @slightfood).
- Return the heading on iOS correctly.
- Downgrade the "meta" package to version 1.7.0 since pub.flutter-io.cn static code analysis reports errors.
- Added support for Android 10’s background location permission;
- Return heading as part of the position on iOS.
- Added integration with public Bitrise CI project;
- Fixed two analysis warnings;
- Fixed a spelling error in docs.
- Added new method to calculate bearing given two points.
- Reverted the update of the 'meta' plugin as Flutter SDK depends on old version.
- Updated dependency on 'meta' plugin to latest version.
- Change geocoding results on Android to return multiple records;
- Extended the example application;
- Use the correct permission level enumeration;
Added documentation regarding AndroidX support. #
- Make sure the stream channel is closed when Android activity is destroyed;
- Allow developers to specify the permission level they want to use when requesting permissions on iOS.
- Converted the iOS version from Swift to Objective-C, reducing the size of the final binary considerably, as well as solve some compatibility issues with other objective-c based plugins;
- Fetch geocoding results on a separate thread not to slow down the main thread;
- Bug fix where the current location could not be determined on non-GPS enabled phones;
- Update to use latest gradle version.
- Update to latest version of the Location Permissions plugin to solve a bug when permissions are sometimes not requested.
- Bug fix on Android which causing the
Reply already submittederror;
location_permissionplugin to version
- Updated to latest version of the Location Permissions plugin (1.1.0).
- Overhauled the permissions system to make sure the plugin only depends on the location API. This means when using this version of the plugin Apple requires only entries for the
- breaking As part of the permission system overhaul, we removed the
disabledpermission status. To check if the location services are running you should call the
isLocationServiceEnabledmethod. This means you can now also request permissions when the location services are disabled.
- Updated dependencies on Permission Handler and Google API Availability to remove Kotlin dependency.
- breaking Updated to support AndroidX;
- Added API method
isLocationServiceEnabledto check if location services are enabled or disabled
- Removed method
checkGeolocationStatus(marked deprecated in version 1.6.4);
- Updated to latest version of Permission Handler plugin to solve some small issues on iOS;
- Added Swift version number to podspec file;
- Added ProGuard support for Android;
- Updated static code analyses to confirm to latest recommendations from Flutter team.
- Updated iOS code to Swift 4.2
- Updated to latest version of the permission_handler plugin (v2.1.2)
- Updated dependencies on Permission Handler and Google API Availability plugins.
- Updated Gradle version
- Bug fix where a null reference exception occurs because the timestamp of the
nullwhen fetching a
- breaking The
getPositionStreammethod now directly returns an instance of the
Stream<Position>class, meaning there is no need to
awaitthe method before being able to access the stream;
- breaking Arguments for the methods
getLastKnownPositionare now named optional parameters instead of positional optional parameters;
- By default Geolocator will use FusedLocationProviderClient on Android when Google Play Services are available. It will fall back to LocationManager when it is not available. You can override the behaviour by setting
Geolocator geolocator = Geolocator()..forceAndroidLocationManager = true;
- Allow developers to specify a desired interval for active location updates, in milliseconds (Android only).
- Added timestamp to instances of the
Positionclass indicating when the GPS fix was acquired;
- Updated the dependency on the
PermissionHandlerto version >=2.0.0 <3.0.0.
- Fixed bug on Android when not supplying a locale while using the Geocoding features.
- Added support to supply a locale when using the
- Deprecated the static method
checkGeolocationStatusin favor of the instance method
checkGeolocationPermissionStatus(the static version will be removed in version 2.0 of the Geolocator plugin).
- Added feature to check the availability of Google Play services on the device (using the
checkGooglePlayServicesAvailabilitymethod). This will allow developers to implement a more user friendly experience regarding the usage of Google Play services (for more information see the article Set Up Google Play Services);
- Fixed the error
'List<dynamic>' is not a subtype of type 'Future<dynamic>'on Flutter 0.6.2 and higher (thanks @fawadkhanucp for reporting the issue and solution);
- Fixed an error when calling the
placemarkFromCoordinatesfrom an Android background service (thanks @sestegra for reporting the issue and creating a pull-request).
- Hot fix to solve cast exception
- Fixed a bug which caused stationary location updates not to be streamed when using the new
FusedLocationProviderClienton Android (thanks @audkar for the PR).
- Use the Location Services (through the
FusedLocationProviderClient) on Android if available, otherwise fallback to the
- Make sure that on Android the last know location is returned immediately on the stream when requesting location updates through the
- Updated documentation on adding location permissions on Android.
- It is now possible to check the location permissions using the
checkGeolocationStatusmethod [ISSUE #51].
- Improved the example App [ISSUE #54]
- Solved a bug on Android causing a memory leak when you stop listening to the position stream.
- breaking Solved a bug on Android where permissions could be requested more then once simultaniously [ISSUE #58]
- Solved a bug on Android where requesting permissions twice would cause the App to crash [ISSUE #61]
To be able to correctly fix issue #58 we had to change the
getPositionStreammethod into a
asyncmethod. This means the signature of the method has been changed from:
Stream<Position> getPositionStream([LocationOptions locationOptions = const LocationOptions()])
Future<Stream<Position>> getPositionStream([LocationOptions locationOptions = const LocationOptions()]).
Meaning as a developer you'll now have to
awaitthe result of the method to get access to the actual stream.
- Added feature to query the last known location that is stored on the device using the
- breaking Renamed the
- Fixed bug where calling
getCurrentPositionon Android resulted in returning the last known location;
- breaking Renamed methods
fromPlacemarkrespectively to the, more meaningfull names,
- Added support for iOS
bestwhen on Android).
- Added the option to check the distance between two geocoordinates (using the
- Make sure that an Android App using the plugin is informed when the platform stops transmitting location updates.
- Added feature to throttle the amount of locations updates based on a supplied distance filter.
This introduces a breaking change since the signature of the
getPositionStreamhas changed from
- Made some small changes to ensure the plugin no longer is depending on JAVA 8, meaning the plugin will run using the default Android configuration.
- Added support to translate an address into geocoordinates and vice versa (a.k.a. Geocoding). See the README.md file for more information.
- Fixed reported formatting issues
- Fixed a warning generated by xCode when compiling the example project (see issue #28)
- Fixed some warnings generated by Dart static code analyser, improving code quality
- Introduced the option to supply a desired accuracy.
This introduces a breaking change, the
onPositionChangedproperties have been replaced by methods (
getPosition([LocationAccuracy desiredAccuracy = LocationAccuracy.Best])and
getPositionStream([LocationAccuracy desiredAccuracy = LocationAccuracy.Best])respectively) accepting a parameter to indicate the desired accuracy.
- Updated documentation
- API defined stable
- Solved problem with missing geolocator-Swift.h header file (see also issue Flutter#16049).
- Initial release