Object representing a VehicleLocation for a trip vehicle.
Public Constructor Summary
Public Method Summary
abstract int |
getHeading()
Returns the bearing of the vehicle in degrees.
|
abstract long |
getServerTimeMillis()
The timestamp in milliseconds when Fleet Engine received the updated location.
|
abstract double |
getSpeedKmph()
Speed of the vehicle in kilometers per hour.
|
abstract long |
getUpdateTime()
The timestamp in milliseconds when the location was collected by the driver
application (Client side).
|
Inherited Method Summary
Public Constructors
public VehicleLocation ()
Public Methods
public abstract int getHeading ()
Returns the bearing of the vehicle in degrees.
The value is in the range of [0, 360).
public abstract long getServerTimeMillis ()
The timestamp in milliseconds when Fleet Engine received the updated location.
You can use this to determine if the "Driver" is "Connected". By comparing this timestamp with the current time in the device, you can determine how long ago the driver location was reported to Fleet Engine.
public abstract double getSpeedKmph ()
Speed of the vehicle in kilometers per hour.
public abstract long getUpdateTime ()
The timestamp in milliseconds when the location was collected by the driver application (Client side).
This is usually provided by NavSDK or the FusedLocationProvider, and in certain scenarios they might not be able to provide an “updated” location. Based on that, you can use this timestamp to determine if the location is stale and react to it, for example, to provide a UX message informing the rider that the driver location or ETA might not be accurate.