DefaultLocationPermissionManager

The BasePermissionManager to use as a default for LocationPermission

Parameters

context

the Context the LocationPermission is to be granted in

locationPermission

the LocationPermission to manage

settings

the Settings to apply to this manager.

coroutineScope

the CoroutineScope of this manager.

The default Apple BasePermissionManager for LocationPermission.

The request/monitoring flow is identical across Apple targets; the genuinely platform-specific pieces are delegated to configureForLocationPermission, locationUsageDescriptions, CLLocationManager.requestLocationAuthorization and CLLocationManager.authorizationStatus.

Parameters

locationPermission

the LocationPermission to manage

settings

the Settings to apply to this manager.

coroutineScope

the CoroutineScope of this manager.

bundle

the NSBundle the LocationPermission is to be granted in

The default BasePermissionManager for LocationPermission on the JS family (js + wasmJs).

Backed by the W3C Permissions API: navigator.permissions.query({ name: 'geolocation' }) is polled on the monitoring interval (the onchange callback can't be marshaled cleanly across the JS family). The browser exposes no programmatic permission request, so requestPermissionDidStart triggers the prompt by issuing a one-shot getCurrentPosition. background/precise distinctions don't exist on the web.

Parameters

locationPermission

the LocationPermission to manage

settings

the Settings to apply to this manager.

coroutineScope

the CoroutineScope of this manager.

Constructors

Link copied to clipboard
constructor(context: Context, locationPermission: LocationPermission, settings: BasePermissionManager.Settings, coroutineScope: CoroutineScope)
constructor(bundle: NSBundle, locationPermission: LocationPermission, settings: BasePermissionManager.Settings, coroutineScope: CoroutineScope)
constructor(locationPermission: LocationPermission, settings: BasePermissionManager.Settings, coroutineScope: CoroutineScope)

Properties

Link copied to clipboard
Link copied to clipboard
open override val events: Flow<PermissionManager.Event>
open override val events: Flow<PermissionManager.Event>
open override val events: Flow<PermissionManager.Event>
open override val events: Flow<PermissionManager.Event>
Link copied to clipboard
expect override val permission: LocationPermission

Functions

Link copied to clipboard
override fun requestPermission()
override fun requestPermission()
override fun requestPermission()
override fun requestPermission()
Link copied to clipboard
override fun startMonitoring(interval: Duration)
override fun startMonitoring(interval: Duration)
override fun startMonitoring(interval: Duration)
override fun startMonitoring(interval: Duration)
Link copied to clipboard
override fun stopMonitoring()
override fun stopMonitoring()
override fun stopMonitoring()
override fun stopMonitoring()