ProxyLocationProvider

Deprecated

This will be removed 6 months after the next release.

Replace with

Options for replacement are:
Create custom implementation of `LocationProvider` with `setLocation` method.
Use `SimulationLocationProvider` with custom `SimulationStrategy` that simulates fixed position.
Use the `DefaultLocationProviderFactory.create` method to create instance of `LocationProvider` and use mock location to replace `setLocation` method.

Implementation of the LocationProvider which provides location programmatically set with setLocation.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val lastKnownLocation: GeoLocation?

The last known location, or null if no location has been determined yet.

Functions

Link copied to clipboard

Adds an OnLocationUpdateListener which informs about new GeoLocation each time a location change occurs.

Link copied to clipboard
open override fun close()

Closes the object and removes all registered listeners. After closing, any function call to this object will throw an IllegalStateException.

Link copied to clipboard
open override fun disable()

Disables the location provider.

Link copied to clipboard
open override fun enable()

Enables the location provider.

Link copied to clipboard

Removes previously registered OnLocationUpdateListener.

Link copied to clipboard
fun setLocation(location: GeoLocation)

Sets location which will be propagated to all listeners.

Inherited functions

Link copied to clipboard
open fun addPredictionsUpdateListener(listener: PredictionsUpdateListener)
Link copied to clipboard
open fun removePredictionsUpdateListener(listener: PredictionsUpdateListener)