rememberDefaultLocationProvider

@RequiresPermission(anyOf = ["android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION"])
actual fun rememberDefaultLocationProvider(updateInterval: Duration, desiredAccuracy: DesiredAccuracy, minDistance: Length): LocationProvider(source)

Create and remember a LocationProvider using the default implementation for the platform.

The configuration parameters updateInterval, desiredAccuracy and minDistance may all be ignored, if the platform doesn't support them

NOTE: There are also platform-specific remember*LocationProvider functions you may want to use, if you need more control over the configuration.

Parameters

updateInterval

the desired interval for updates

desiredAccuracy

the DesiredAccuracy for location updates

minDistance

the minimum distance between locations to trigger an update

See also

Throws

if LocationProvider no default LocationProvider is provided for the platform

if the necessary platform permissions have not been granted, use rememberNullLocationProvider as a fallback

expect fun rememberDefaultLocationProvider(updateInterval: Duration = 1.seconds, desiredAccuracy: DesiredAccuracy = High, minDistance: Length = 1.meters): LocationProvider(source)

Create and remember a LocationProvider using the default implementation for the platform.

The configuration parameters updateInterval, desiredAccuracy and minDistance may all be ignored, if the platform doesn't support them

NOTE: There are also platform-specific remember*LocationProvider functions you may want to use, if you need more control over the configuration.

Parameters

updateInterval

the desired interval for updates

desiredAccuracy

the DesiredAccuracy for location updates

minDistance

the minimum distance between locations to trigger an update

See also

Throws

if LocationProvider no default LocationProvider is provided for the platform

if the necessary platform permissions have not been granted, use rememberNullLocationProvider as a fallback

actual fun rememberDefaultLocationProvider(updateInterval: Duration, desiredAccuracy: DesiredAccuracy, minDistance: Length): LocationProvider(source)

Create and remember a LocationProvider using the default implementation for the platform.

The configuration parameters updateInterval, desiredAccuracy and minDistance may all be ignored, if the platform doesn't support them

NOTE: There are also platform-specific remember*LocationProvider functions you may want to use, if you need more control over the configuration.

Parameters

updateInterval

the desired interval for updates

desiredAccuracy

the DesiredAccuracy for location updates

minDistance

the minimum distance between locations to trigger an update

See also

Throws

if LocationProvider no default LocationProvider is provided for the platform

if the necessary platform permissions have not been granted, use rememberNullLocationProvider as a fallback

actual fun rememberDefaultLocationProvider(updateInterval: Duration, desiredAccuracy: DesiredAccuracy, minDistance: Length): LocationProvider(source)

Create and remember a LocationProvider using the default implementation for the platform.

The configuration parameters updateInterval, desiredAccuracy and minDistance may all be ignored, if the platform doesn't support them

NOTE: There are also platform-specific remember*LocationProvider functions you may want to use, if you need more control over the configuration.

Parameters

updateInterval

the desired interval for updates

desiredAccuracy

the DesiredAccuracy for location updates

minDistance

the minimum distance between locations to trigger an update

See also

Throws

if LocationProvider no default LocationProvider is provided for the platform

if the necessary platform permissions have not been granted, use rememberNullLocationProvider as a fallback

actual fun rememberDefaultLocationProvider(updateInterval: Duration, desiredAccuracy: DesiredAccuracy, minDistance: Length): LocationProvider(source)

Create and remember a LocationProvider using the default implementation for the platform.

The configuration parameters updateInterval, desiredAccuracy and minDistance may all be ignored, if the platform doesn't support them

NOTE: There are also platform-specific remember*LocationProvider functions you may want to use, if you need more control over the configuration.

Parameters

updateInterval

the desired interval for updates

desiredAccuracy

the DesiredAccuracy for location updates

minDistance

the minimum distance between locations to trigger an update

See also

Throws

if LocationProvider no default LocationProvider is provided for the platform

if the necessary platform permissions have not been granted, use rememberNullLocationProvider as a fallback