Location Provider Impl
class LocationProviderImpl(context: Context, systemManager: SystemManager) : LocationProvider
Content copied to clipboard
Types
Functions
current Location
Link copied to clipboard
open suspend override fun currentLocation(validate: Boolean): Completion<Location?>
Content copied to clipboard
Returns the current location from Fused Location Provider API or from LocationManager as fallback (getCurrentLocation or requestSingleUpdate depending on API level) If validate is set to true, it will only return the location if it is valid and null otherwise. In case of error it returns a Throwable.
first Valid Location
Link copied to clipboard
Requests location updates from Fused Location Provider API or from LocationManager as fallback and returns the first valid Location or a Throwable.
last Known Location
Link copied to clipboard
open suspend override fun lastKnownLocation(validate: Boolean): Completion<Location?>
Content copied to clipboard
Returns the last location from Fused Location Provider API or the last known location from LocationManager as fallback. If validate is set to true, it will only return the location if it is valid and null otherwise. In case of error it returns a Throwable.
remove Location Updates
Link copied to clipboard
open override fun removeLocationUpdates()
Content copied to clipboard
request Location Updates
Link copied to clipboard
open override fun requestLocationUpdates()
Content copied to clipboard