lockSettings
Command
Locks/unlocks application settings
BND_MESSAGE extra of an Intent with the action ACTION_RNC_BROADCAST, to BeNav's activity or receiver: see Sending commands.Protects the configuration a client application has pushed to BeNav. Once that application has set
a vehicle profile, routing preferences or a map mode over RNC, nothing otherwise stops the driver
opening the settings screens and changing them back. lockSettings freezes the controls
the client application owns, so its configuration survives the shift.
A locked control stays visible but is greyed out and ignores taps; the driver can still see how the vehicle is configured, but cannot alter it. Locking never changes the underlying value: it only removes the ability to change it. Two groups can be locked independently: the vehicle category and profile screens, and the itinerary and map settings.
Worth knowing
- The lock state is held in memory only and resets when the application restarts, so the client application must re-send it each session.
- Each group is replaced as a whole. Omitting a group returns it to fully unlocked rather than leaving it as it was.
- The lock applies to the driver, not to RNC. The client application can still change anything it has locked, by sending the corresponding command.
Example: keeping a load-specific profile in place
A haulage operator's application selects a vehicle profile matching the load: height, weight and dangerous-goods class, which together make BeNav avoid the tunnels and bridges that load may not use.
Left unlocked, a driver who finds the route long could switch to a lighter profile and be sent somewhere the vehicle must not go. The application therefore locks profile selection and editing for the duration of the run, and unlocks them when the vehicle is empty again.
Command#
{
"jsonrpc": "2.0",
"method": "lockSettings",
"params": {
"vehicle": {
"enabled": true,
"authorisedCategories": [{"category": "DELIVERY_TRUCK"}, {"category": "LCV"}],
"selectCategory": true,
"selectProfile": true,
"addProfile": true,
"editProfile": true,
"removeProfile": true
},
"itineraryAndMap": {
"enabled": true,
"motorway": true,
"toll": true,
"borderCrossing": true,
"altRoutes": false,
"traffic": false,
"autoRerouting": false,
"ferry": false,
"unpaved": false,
"arrivalSide": false,
"routeOptim": false,
"units": false,
"mapDisplayMode": false,
"roadRestrictions": false,
"showProfileName": false
}
},
"id": "1"
}All boolean fields default to true (unlocked). Setting a field to false locks the matching control: the UI is grayed out and clicks are ignored.
Locking never changes the underlying setting value.
vehicle: locks controls on the vehicle category / profile selection / profile creation / profile edition screens.enabled: master toggle. If false, every other field in vehicle is treated as locked.authorisedCategories: whitelist of allowed VehicleCategory names. Empty list = all categories allowed. Non-whitelisted categories are grayed and non-selectable in the category screen.selectCategory: allow changing the vehicle category.selectProfile: allow changing the selected profile inside a category.addProfile: allow adding a new profile.editProfile: allow editing existing profiles. Per-profile lock still takes precedence: a locked profile is never editable.removeProfile: allow deleting profiles. Per-profile lock still takes precedence: a locked profile is never deletable.
itineraryAndMap: locks individual switches on the routing settings screen.enabled: master toggle. If false, every field initineraryAndMapis treated as locked.motorway,toll,borderCrossing,altRoutes,ferry,unpaved,arrivalSide,routeOptim: individual routing preferences.traffic,autoRerouting: traffic display switch and the auto-rerouting switch.units: locks the unit selector (Metric/Imperial).mapDisplayMode,roadRestrictions,showProfileName: map related settings.
Notes#
- State is held in memory only: it resets on process restart, so the controller must re-send
lockSettingseach session. - Sections are replaced as a whole. Omitting
vehicle(oritineraryAndMap) resets that section to all-unlocked defaults; it does not preserve previous values. - The
selectVehicleProfileRNC command continues to work for profiles in non-authorised categories.
Response#
Generic responses.