Releases: psteiger/LocationFetcher
8.0.0-alpha05
8.0.0-alpha05
8.0.0-alpha04
8.0.0-alpha04
8.0.0-alpha03
8.0.0-alpha03
8.0.0-alpha02
8.0.0-alpha02
8.0.0-alpha01
8.0.0-alpha01
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
.
6.0.1
6.0
This release contains breaking API changes:
-
The following methods do not return results anymore:
suspend fun requestLocationPermissions()
suspend fun requestEnableLocationSettings()
The reason for the change is that waiting for an ActivityResult
and holding onto the coroutine continuation meanwhile is inherently
unsafe.Users should observe the following flows to get the results:
permissionStatus
settingsStatus
Non-breaking API changes:
- New builders:
ComponentActivity.locationFetcher(config: LocationFetcher.Config.() -> Unit)
Context.locationFetcher(config: LocationFetcher.Config.() -> Unit)
Other changes:
- Added configuration option
isWaitForAccurateLocation
for LocationRequest
providers. - Receive location on a worker thread.
- Bump versions and migrate gradle files from Groovy to Kotlin (.kts).
- Depend on ComponentActivity instead of FragmentActivity.