BeNav5 RNC API · Android
Drive BeNav5 from your Android application
Start guidance, manage vehicle profiles, show your own points and zones on its map, and hear back as the trip goes on. Every command is a JSON-RPC 2.0 message carried by an Android Intent.
Send a command
val SEND_ACTION = "ACTION_RNC_BROADCAST"
val SEND_PACKAGE = "com.benomad.benav"
val SEND_CLASS = "com.benomad.benav.MainActivity"
val EXTRA_NAME = "BND_MESSAGE"
val i = Intent(SEND_ACTION)
i.setPackage(SEND_PACKAGE)
i.component = ComponentName(SEND_PACKAGE, SEND_CLASS)
i.putExtra(
EXTRA_NAME,
"{\"jsonrpc\":\"2.0\",\"method\":\"getAppInfo\",\"id\":\"1\"}"
)
startActivity(i)String SEND_ACTION = "ACTION_RNC_BROADCAST";
String SEND_PACKAGE = "com.benomad.benav";
String SEND_CLASS = "com.benomad.benav.MainActivity";
String EXTRA_NAME = "BND_MESSAGE";
Intent i = new Intent(SEND_ACTION);
i.setPackage(SEND_PACKAGE);
i.setComponent(new ComponentName(SEND_PACKAGE, SEND_CLASS));
i.putExtra(EXTRA_NAME, "{\"jsonrpc\":\"2.0\",\"method\":\"getAppInfo\",\"id\":\"1\"}");
startActivity(i);How it works
Send a commandPut the JSON-RPC message in an Intent: start BeNav's activity with it, or send it as a broadcast to BeNav's receiver.Read the answerA command answers with a result, or with an error code from one shared table.Listen to BeNavRegister a receiver for the answers and for the notifications you subscribe to.
Commands
What your application asks BeNav to do, grouped by what it acts on.
ApplicationshowAppstartAppHiddenhideAppstopAppgetAppInfolockSettingsGuidancestartGuidancestopGuidancegetNavigationProgressgetRouteOptionssetRouteOptionsVehicle profileseditVehicleProfileselectVehicleProfilegetVehicleProfilegetVehicleProfilesListdeleteVehicleProfiledisplayVehicleProfileOnMapMapshowPoihidePoihideAllPoisshowPolygonhidePolygonzoomToconfigureAlertsMessages and statusesshowMessagehideMessageupdateVehicleStatusessetVehicleStatusNotificationssetupNotificationsCircuit navigationstartCircuitGuidancejoinCircuit
Notifications
What BeNav tells your application as the trip goes on, once you subscribe.
Introduction
The RNC API is designed to act as a bridge between client apps and the Navigation software.


