public abstract class RidesharingVehicleReporter extends NavigationVehicleReporter

Vehicle reporter for ridesharing that reports location updates and vehicle online/offline state. An app is allowed only one vehicle reporter.

Nested Class Summary

enum RidesharingVehicleReporter.VehicleState Indicates whether a vehicle is accepting new trips. 

Protected Constructor Summary

Public Method Summary


Inherited Method Summary

Protected Constructors

protected RidesharingVehicleReporter (Logger logger)

Public Methods

public void setVehicleState (RidesharingVehicleReporter.VehicleState state)

Sets the VehicleState. If location updates are enabled, the value will propagate at the next location update. If location updates are disabled, the update is fired immediately.

VehicleState update is made in a background thread, this call returns immediately.

Setting VehicleState as online here changes the view of the NavigationView from Map to Navigation (Camera perspective is tilted and blue dot switches to navigation mode).

IllegalStateException if VehicleState is set ONLINE when location tracking is not yet enabled.