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

FusedLocationSource

@DeprecatedSince(2020, 12) open class FusedLocationSource : LocationCallback, LocationSource, ConnectionCallbacks, OnConnectionFailedListener, Contextable

Default location source implementation. It is based on FusedLocationService provided by Google. When no custom location source provided, map is using it to get the user location. It uses {LocationUpdateListener} to notify about new location updates.

Constructors

<init>

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

Default constructor to create fused location source implementation.

Functions

activate

open fun activate(): Unit
open fun activate(locationRequest: LocationRequest!): Unit

addLocationUpdateListener

open fun addLocationUpdateListener(locationUpdateListener: LocationUpdateListener!): Unit

deactivate

open fun deactivate(): Unit

getAllLocationUpdateListeners

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

getContext

open fun getContext(): Context?

getFusedLocationProviderClient

open fun getFusedLocationProviderClient(): FusedLocationProviderClient

getLastKnownLocation

open fun getLastKnownLocation(): Location?

onConnected

open fun onConnected(bundle: Bundle?): Unit

onConnectionFailed

open fun onConnectionFailed(connectionResult: ConnectionResult): Unit

onConnectionSuspended

open fun onConnectionSuspended(i: Int): Unit

onLocationAvailability

open fun onLocationAvailability(locationAvailability: LocationAvailability!): Unit

onLocationChanged

open fun onLocationChanged(location: Location!): Unit

onLocationResult

open fun onLocationResult(locationResult: LocationResult!): Unit

removeAllLocationUpdateListeners

open fun removeAllLocationUpdateListeners(): Unit

removeLocationUpdateListener

open fun removeLocationUpdateListener(locationUpdateListener: LocationUpdateListener!): Unit