public static interface Trip.EtaListener
Modifier and Type | Method and Description |
---|---|
void |
onError(Trip.RequestError error)
Callback if an Error occured in when requesting the ETA.
|
void |
onEta(Trip trip,
Routeable waypoint,
org.json.JSONObject etaInfo)
Callback with the ETA for the specified Trip and the specified waypoint.
|
void onEta(Trip trip, Routeable waypoint, org.json.JSONObject etaInfo)
trip
- The trip object Trip
.waypoint
- The waypoint object Routeable
.etaInfo
- The ETA information.Format of the returned JSON
{ eta : "<ETA in UTC (in seconds)>", offset : "<Offset in seconds between the current position timezone and this waypoint's time zone>", } Note: an eta of -1 means that the waypoint has been passed already. Note: an offset of -1 means that the offset is currently not known (e.g. because we do not have a GPS fix yet).
void onError(Trip.RequestError error)
error
- The error of the ETA request call, see Trip.RequestError
.