Skip to content

8.0.0

Compare
Choose a tag to compare
@psteiger psteiger released this 07 Nov 18:31
· 14 commits to master since this release
ae67f95

What's Changed

Full Changelog: 7.0.0...8.0.0

Breaking changes

  • Location flow, permission flow and settings flow are now SharedFlow. Using StateFlow is conceptually wrong because it does not necessarily mean the current state. If you used .value on the previous flows, you can now use replayCache.last().
  • LocationFetcher.location is now a SharedFlow<Either<Nel<Error>, Location>>. It now reports the errors in the left side of the Either value in case it failed to obtain a location.
  • LocationFetcher.permissionStatus and LocationFetcher.settingsStatus are now SharedFlow<Boolean>. The old enums PermissionStatus and SettingsStatus are now deprecated.
  • Removed LocationFetcher.requestLocationPermissionOnLifecycle and LocationFetcher.requestEnableLocationSettingsOnLifecycle configs from LocationFetcher.Config. Instead of requesting permissions and setting enablement on their own, it's now requested automatically once the location flows is subscribed to.
  • Removed the possibility to ask for location indefinitely. We now use (and require) a rationale for asking for location. If user denies the permission once, the rationale is shown and we ask the permission one more time. If the user denies it, we respect the user decision and don't ask again. This is in accordance with Google's best practices and policies on location fetching. The rationale is a String passed to the LocationFetcher builders.

Other changes

  • Added LocationFetcher.shouldShowRationale(): Boolean. Should return true after user denied location permission once. It's used internally to decide whether to show a rationale to the user before asking for permission again, but it's also exposed as an API.