getNavigationProgress
Command
Retrieves navigation progress data
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.Asks for the state of the current journey at a moment of the client application's choosing, rather
than waiting for the next notification. It returns exactly the same payload as
onNavigationProgressChanged.
Use it when something on the client application's side needs an answer now: a dispatcher opening a vehicle's detail view, an ETA requested by an end customer, a report generated on a timer, instead of caching whatever the last notification happened to carry.
Worth knowing
- It only answers during guidance. With no journey in progress it returns
7 not.in.guidance.
Command#
json
{
"jsonrpc": "2.0",
"method": "getNavigationProgress",
"params": {
"waypointsInfo": true
},
"id": "1"
}waypointsInfoIf enabled, will return also the remainingwaypointsguidance progress. Otherwise only return thedestinationdata. [true|false]
Response#
Success#
json
{
"jsonrpc": "2.0",
"result": {
// See onNavigationProgressChanged section
},
"id": "1"
}See onNavigationProgressChanged section for detailed response object.
Error#
Generic errors.
If there is no navigation is progress returns error 7 NOT_IN_GUIDANCE.