BeNav5RNC API
Android

selectVehicleProfile

Command

Selects a vehicle profile

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.

Makes one of the client application's profiles the active one. Everything BeNav computes afterwards (route, restrictions shown on the map, restriction alerts) uses it.

This is how a client application reacts to a vehicle changing character during the day: a trailer coupled, a load taken on, a switch from a light to a heavy configuration.

Worth knowing

  • Only profiles created over RNC can be selected. Profiles the driver created are not addressable.
  • An unknown id returns 27 profile.not.found.error.
  • It keeps working for categories excluded by lockSettings: the lock restricts the driver, not the client application.

Command#

json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "selectVehicleProfile",
  "params": {
    "id": "custom_profile_1"
  }
}

Response#

Success#

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

Error#

Generic errors, or if the profile is not found:

json
{
  "id": "1",
  "jsonrpc": "2.0",
  "error": {
    "code": 27,
    "message": "profile.not.found.error"
  }
}