LocationManager

interface LocationManager extends HybridObject

Properties

lastKnownLocation

readonly lastKnownLocation: 
  | Location
  | undefined

Get the last known Location, or undefined if no location is known.


locationPermissionStatus

readonly locationPermissionStatus: PermissionStatus

Get the current location permission status.

The PermissionStatus depends on this LocationManager's configuration, as properties like LocationAccuracy affect locationPermissionStatus.

Methods

addOnLocationChangedListener()

addOnLocationChangedListener(callback: (location: Location) => void): ListenerSubscription

Adds a callback to be called whenever the current Location changes.


requestLocationPermission()

requestLocationPermission(): Promise<boolean>

Request location permission.


startUpdating()

startUpdating(): Promise<void>

Start updating location updates.


stopUpdating()

stopUpdating(): Promise<void>

Stop updating location updates.