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

AbstractLocationSource

abstract class AbstractLocationSource : LocationSource, LocationListener

Base class for all LocationSources. It contains the listeners list and propagate onLocationChange events to added listeners.

Constructors

<init>

AbstractLocationSource()

Base class for all LocationSources. It contains the listeners list and propagate onLocationChange events to added listeners.

Functions

addLocationUpdateListener

open fun addLocationUpdateListener(locationUpdateListener: LocationUpdateListener?): Unit

{@inheritDoc}

getAllLocationUpdateListeners

open fun getAllLocationUpdateListeners(): List<LocationUpdateListener>

{@inheritDoc}

onLocationChanged

open fun onLocationChanged(location: Location): Unit

{@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}

Inherited Functions

activate

abstract fun activate(): Unit

Activates the provider. The provider will notify the listener periodically, until the user calls deactivate().

deactivate

abstract fun deactivate(): Unit

Deactivates this provider. The provider does not send any location notifications.

getLastKnownLocation

abstract fun getLastKnownLocation(): Location?

Last valid location of the user. The value can be null.

Inheritors

BasicLocationSource

open class BasicLocationSource : AbstractLocationSource

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