sdk-common / com.tomtom.online.sdk.location / BasicLocationSource

BasicLocationSource

open class BasicLocationSource : AbstractLocationSource

The basic implementation of the LocationSource which relies on the default Android mechanism to obtain location ( via LocationManager ).

Constructors

<init>

BasicLocationSource(context: Context!)

Default constructor to create a basic location source. This constructor uses a default LocationRequest in which minimal time between location updates is set to 5s.

BasicLocationSource(context: Context!, locationRequest: LocationRequest!)

Constructor that allows to provide a custom LocationRequest that will be used with available providers.

Functions

activate

open fun activate(): Unit

deactivate

open fun deactivate(): Unit

getLastKnownLocation

open fun getLastKnownLocation(): Location?

onLocationChanged

open fun onLocationChanged(location: Location): Unit

Inherited Functions

addLocationUpdateListener

open fun addLocationUpdateListener(locationUpdateListener: LocationUpdateListener?): Unit

{@inheritDoc}

getAllLocationUpdateListeners

open fun getAllLocationUpdateListeners(): List<LocationUpdateListener>

{@inheritDoc}

onProviderDisabled

open fun onProviderDisabled(provider: String): Unit

{@inheritDoc}

onProviderEnabled

open fun onProviderEnabled(provider: String): Unit

{@inheritDoc}

onStatusChanged

open fun onStatusChanged(provider: String, status: Int, extras: Bundle): Unit

{@inheritDoc}

removeAllLocationUpdateListeners

open fun removeAllLocationUpdateListeners(): Unit

{@inheritDoc}

removeLocationUpdateListener

open fun removeLocationUpdateListener(locationUpdateListener: LocationUpdateListener): Unit

{@inheritDoc}