WindowsLocationPermissionRequester

Foreground Windows location permission holder.

WindowsLocationProvider delegates LocationProvider.permission and LocationProvider.requestPermission to this class. Custom providers can use it directly. AppCapability.Create("location").CheckAccess() maps Allowed to LocationPermission.Granted with LocationAccuracyAuthorization.Unknown, UserPromptRequired to a requestable LocationPermission.NotGranted, user or system denial and a missing packaged capability to a non-requestable value, and unknown failures to canRequest = null. AccessChanged keeps status synchronized with changes made in Windows Settings.

requestForegroundPermission suppresses duplicate requests and starts Geolocator.RequestAccessAsync() on the AWT event-dispatch thread.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Whether the process has a usable Windows Runtime location implementation.

Link copied to clipboard
val status: StateFlow<LocationPermission>

Current Windows location access, including changes made outside the application.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard

Starts a foreground permission request and publishes its result to status.