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

getAllLocationUpdateListeners

open fun getAllLocationUpdateListeners(): MutableList<LocationUpdateListener!>!

onLocationChanged

open fun onLocationChanged(location: Location!): Unit

onProviderDisabled

open fun onProviderDisabled(provider: String!): Unit

onProviderEnabled

open fun onProviderEnabled(provider: String!): Unit

onStatusChanged

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

removeAllLocationUpdateListeners

open fun removeAllLocationUpdateListeners(): Unit

removeLocationUpdateListener

open fun removeLocationUpdateListener(locationUpdateListener: LocationUpdateListener!): Unit

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 ).