BeNav5RNC API
Android

setVehicleStatus

Command

Forces the current vehicle status by id

Send this JSON-RPC message in the BND_MESSAGE extra of an Intent with the action ACTION_RNC_BROADCAST, to BeNav's activity or receiver: see Sending commands.

Sets the driver's current status from the client application, rather than waiting for the driver to tap it. The status must be one of those pushed by updateVehicleStatuses.

It behaves exactly as if the driver had chosen it (the button updates and onVehicleStatusChanged fires) so both routes to a status change look the same to everyone watching.

Worth knowing

  • An id outside the current set returns 34 vehicle.status.id.not.found.
Example: keeping the device honest

A courier marks a parcel delivered in the client application on their phone. Rather than leave the vehicle showing Delivering on the in-cab screen, the application sends setVehicleStatus to move it to Available, so what the driver sees matches what dispatch sees.

Command#

json
{
  "jsonrpc": "2.0",
  "method": "setVehicleStatus",
  "params": {
    "id": 2
  },
  "id": "1"
}

Response#

Success#

json
{
  "jsonrpc": "2.0",
  "result": {},
  "id": "1"
}

Error#

Generic errors, plus 34 vehicle.status.id.not.found when the id is not part of the current set (or no set has been pushed).