7.0.0
API changes:
-
LocationFetcher.create()
andLocationSource.create()
abandoned
in favour of builder functionsLocationSource()
andLocationFetcher()
. -
LocationSource flows are now StateFlows instead of SharedFlows.
-
LocationSource's
setCustomLocation(Location)
andsetPreferredSource(Source)
changed to vars,customLocation
andlocationSource
. -
Dropped
@ExperimentalCoroutinesApi
. -
Context.LocationFetcher()
requires an explicitLifecycleOwner
(previously,
theProcessLifecycleOwner
singleton was used implicitly).
ComponentActivity.LocationFetcher()
still uses theActivity
as the
LifecycleOwner
. -
LocationFetcher.Config.requestLocationPermissions
and
LocationFetcher.Config.requestEnableLocationSettings
booleans changed to:
var requestLocationPermissionOnLifecycle: Lifecycle.State? = Lifecycle.State.STARTED,
var requestEnableLocationSettingsOnLifecycle: Lifecycle.State? = Lifecycle.State.STARTED,
Which defines the Lifecycle state that will be used for asking for
location permission or location setting enablement. To disable them,
set to null
.