Known Indirect Subclasses |
Defines signatures for methods that are called when road-snapped location updates become available. All notifications will occur on the UI thread.
Constant Summary
String | IS_ROAD_SNAPPED_KEY | Bundle key for the Location object returned in onLocationChanged(Location) . |
Public Method Summary
abstract void |
onLocationChanged(Location location)
Called when the user's location is updated.
|
void |
onRawLocationUpdate(Location location)
Called when raw location events are sent.
|
Constants
public static final String IS_ROAD_SNAPPED_KEY
Bundle key for the Location object returned in onLocationChanged(Location)
. When available,
maps to a boolean value that indicates whether the location was snapped to the best available
road. Note that this value may sometimes have hiccups and may differ from what aGMM UI shows.
Retrieve the value with location.getExtras().getBoolean(LocationListener.IS_ROAD_SNAPPED_KEY)
Public Methods
public abstract void onLocationChanged (Location location)
Called when the user's location is updated.
This is provided as frequently as possible by the location provider. Locations are only road-snapped when in driving mode, not when walking or cycling.
Parameters
location | the driver's location. Contains IS_ROAD_SNAPPED Bundle key when information is available. |
---|
public void onRawLocationUpdate (Location location)
Called when raw location events are sent. Empirically, we sometimes see these when the road-snapped events are not sent.
Parameters
location | the driver's location. |
---|