RoadSnappedLocationProvider

public interface RoadSnappedLocationProvider

Allows subscription to road-snapped user locations. Note that subscribing to road-snapped location updates may cause battery drain or unintentional collection of user location data if left running in the background.

Implementations of this interface are thread-safe.

Nested Class Summary

interface RoadSnappedLocationProvider.LocationListener Defines signatures for methods that are called when road-snapped location updates become available. 

Public Method Summary

abstract void
addLocationListener(RoadSnappedLocationProvider.LocationListener listener)
Registers a listener for road-snapped location updates.
abstract void
removeLocationListener(RoadSnappedLocationProvider.LocationListener listener)
Unregisters the given listener if it is currently registered, otherwise it has no effect.
abstract void
abstract void
resetFreeNav()
Attempts to restart the freenav service.
abstract void

Public Methods

public abstract void addLocationListener (RoadSnappedLocationProvider.LocationListener listener)

Registers a listener for road-snapped location updates.

In order to avoid memory leaks, battery drain, or unintended logging of user location, removeLocationListener(RoadSnappedLocationProvider.LocationListener) should be called when the listener is no longer required (for example, when the app is backgrounded).

Existing registered listeners will stay registered until explicitly removed by a removeLocationListener(RoadSnappedLocationProvider.LocationListener) call.

Parameters
listener the listener to be registered

public abstract void removeLocationListener (RoadSnappedLocationProvider.LocationListener listener)

Unregisters the given listener if it is currently registered, otherwise it has no effect.

Parameters
listener the listener to be unregistered

public abstract void requestLocationUpdates (RoadSnappedLocationProvider.LocationListener listener)

This method is deprecated.
use addLocationListener(RoadSnappedLocationProvider.LocationListener)

Registers a listener for road-snapped location updates. Overrides any previously registered listeners.

In order to avoid memory leaks, battery drain, or unintended logging of user location, stopRequestingLocationUpdates() should be called when the listener is no longer required (for example, when the app is backgrounded).

Calling this method with a null argument is equivalent to calling stopRequestingLocationUpdates().

Parameters
listener the listener to register

public abstract void resetFreeNav ()

Attempts to restart the freenav service. This should be called if the service does not appear to be running normally.

public abstract void stopRequestingLocationUpdates ()

This method is deprecated.
use removeLocationListener(RoadSnappedLocationProvider.LocationListener)

Unregisters any listener that was set for road-snapped location updates. In order to avoid memory leaks, battery drain, or unintended logging of user location, this method should be called when the listener is no longer required (for example, when the app is backgrounded).