LocationManager

interface LocationManager

Manages monitoring for Location

Inheritors

Types

Link copied to clipboard
sealed class Event

Events detected by LocationManager

Properties

Link copied to clipboard
abstract val events: Flow<LocationManager.Event>

A Flow of all the Event detected by the location manager

Link copied to clipboard

The LocationPermission used for managing this location. If LocationPermission.precise this will scan location at high accuracy If LocationPermission.background this will monitor location from the background

Link copied to clipboard
abstract val locations: Flow<Location.KnownLocation>

A Flow of the Location.KnownLocation detected by the location manager

Functions

Link copied to clipboard
abstract fun isLocationEnabled(): Boolean

If true the location service is currently enabled

Link copied to clipboard
abstract suspend fun requestEnableLocation()

Attempts to request the user to enable the location service

Link copied to clipboard
abstract suspend fun startMonitoringLocation()

Starts monitoring for new Location.KnownLocation that will be emitted on the locations flow

Link copied to clipboard
abstract suspend fun startMonitoringLocationEnabled()

Starts monitoring for changes related to the location service being enabled This will result in Event.LocationEnabled and Event.LocationDisabled on the events flow

Link copied to clipboard
abstract suspend fun startMonitoringPermissions()

Starts monitoring for changes to permissions related to locationPermission This will result in Event.PermissionChanged on the events flow

Link copied to clipboard
abstract suspend fun stopMonitoringLocation()

Stops monitoring for new Location.KnownLocation

Link copied to clipboard
abstract suspend fun stopMonitoringLocationEnabled()

Stops monitoring for changes related to the location service being enabled

Link copied to clipboard
abstract suspend fun stopMonitoringPermissions()

Stops monitoring for changes to permissions related to locationPermission