DefaultLocationManager

A default implementation of BaseLocationManager

Parameters

context

the Context in which to manage the location

locationManager

the android.location.LocationManager to manage the location

locationProvider

the LocationProvider to provide the location

settings

the Settings to configure this location manager

coroutineScope

the CoroutineScope this location manager runs on

A default implementation of BaseLocationManager

A default implementation of BaseLocationManager

Parameters

settings

the Settings to configure this location manager

coroutineScope

the CoroutineScope this location manager runs on

A default implementation of BaseLocationManager

Parameters

settings

the Settings to configure this location manager

coroutineScope

the CoroutineScope this location manager runs on

A default implementation of BaseLocationManager

Parameters

settings

the Settings to configure this location manager

coroutineScope

the CoroutineScope this location manager runs on

Constructors

Link copied to clipboard
constructor(context: Context, locationManager: LocationManager?, locationProvider: LocationProvider, settings: BaseLocationManager.Settings, coroutineScope: CoroutineScope)
constructor(settings: <Error class: unknown class>, coroutineScope: <Error class: unknown class>)
constructor(settings: BaseLocationManager.Settings, coroutineScope: CoroutineScope)
constructor(settings: BaseLocationManager.Settings, coroutineScope: CoroutineScope)

Types

Link copied to clipboard
class Builder(context: Context = ApplicationHolder.applicationContext, locationManager: LocationManager? = context.getSystemService( Context.LOCATION_SERVICE, ) as? android.location.LocationManager, createLocationProvider: (BaseLocationManager.Settings) -> LocationProvider) : BaseLocationManager.Builder

Builder for creating a DefaultLocationManager

class Builder

Builder for creating a DefaultLocationManager

Properties

coroutineContext
Link copied to clipboard
Link copied to clipboard
open override val events: Flow<LocationManager.Event>

A Flow of all the Event detected by the location manager

open override val events: Flow<LocationManager.Event>

A Flow of all the Event detected by the location manager

open override val events: Flow<LocationManager.Event>

A Flow of all the Event detected by the location manager

open override val events: Flow<LocationManager.Event>

A Flow of all the Event detected by the location manager

Link copied to clipboard
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

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

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

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
open override val locations: Flow<Location.KnownLocation>

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

open override val locations: Flow<Location.KnownLocation>

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

open override val locations: Flow<Location.KnownLocation>

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

open override val locations: Flow<Location.KnownLocation>

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

Functions

Link copied to clipboard
open override fun isLocationEnabled(): Boolean

If true the location service is currently enabled

open override fun isLocationEnabled(): Boolean

If true the location service is currently enabled

open override fun isLocationEnabled(): Boolean

If true the location service is currently enabled

open override fun isLocationEnabled(): Boolean

If true the location service is currently enabled

Link copied to clipboard
open suspend override fun requestEnableLocation()

Attempts to request the user to enable the location service

abstract suspend fun requestEnableLocation()

Attempts to request the user to enable the location service

open suspend fun requestEnableLocation()
open suspend override fun requestEnableLocation()

Attempts to request the user to enable the location service

open suspend override fun requestEnableLocation()

Attempts to request the user to enable the location service

Link copied to clipboard
open suspend override fun startMonitoringLocation()

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

abstract suspend fun startMonitoringLocation()

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

open suspend fun startMonitoringLocation()
open suspend override fun startMonitoringLocation()

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

open suspend override fun startMonitoringLocation()

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

Link copied to clipboard
open suspend override 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

open suspend override 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

open suspend override 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

open suspend override 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
open suspend override fun startMonitoringPermissions()

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

open suspend override fun startMonitoringPermissions()

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

open suspend override fun startMonitoringPermissions()

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

open suspend override 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
open suspend override fun stopMonitoringLocation()

Stops monitoring for new Location.KnownLocation

abstract suspend fun stopMonitoringLocation()

Stops monitoring for new Location.KnownLocation

open suspend fun stopMonitoringLocation()
open suspend override fun stopMonitoringLocation()

Stops monitoring for new Location.KnownLocation

open suspend override fun stopMonitoringLocation()

Stops monitoring for new Location.KnownLocation

Link copied to clipboard
open suspend override fun stopMonitoringLocationEnabled()

Stops monitoring for changes related to the location service being enabled

open suspend override fun stopMonitoringLocationEnabled()

Stops monitoring for changes related to the location service being enabled

open suspend override fun stopMonitoringLocationEnabled()

Stops monitoring for changes related to the location service being enabled

open suspend override fun stopMonitoringLocationEnabled()

Stops monitoring for changes related to the location service being enabled

Link copied to clipboard
open suspend override fun stopMonitoringPermissions()

Stops monitoring for changes to permissions related to locationPermission

open suspend override fun stopMonitoringPermissions()

Stops monitoring for changes to permissions related to locationPermission

open suspend override fun stopMonitoringPermissions()

Stops monitoring for changes to permissions related to locationPermission

open suspend override fun stopMonitoringPermissions()

Stops monitoring for changes to permissions related to locationPermission