UI.AddCommand represents a request from an application to add a command to the application's menu or sub-menu. This RPC can be sent to the HMI for an application that is registered and in any state (FULL, BACKGROUND, etc.)
menuParams
.BC.OnResetTimeout
notification to SDL in case more time for processing UI.AddSubMenu
request is needed.menuParams
contains a parentID
, the command is part of a sub menu. SDL adds new sub menus via the UI.AddSubMenu request.menuParams
contains a parentID
the command is part of a sub menu. SDL adds SubMenu Commands to the top level Menu via UI.AddSubMenuinternal_consecutiveNumber
in the same order as they were created by mobile app in previous ignition cycle.As of Core 7.1, UI.AddCommand requests can contain all UI elements that were previously found in a Perform Interaction's Choice.
Name | Type | Mandatory | Additional |
---|---|---|---|
cmdID | Integer | true | minvalue: 0 maxvalue: 2000000000 |
menuParams | Common.MenuParams | false | |
cmdIcon | Common.Image | false | |
secondaryImage | Common.Image | false | |
appID | Integer | true |
This RPC has no additional parameter requirements
{ "id" : 215, "jsonrpc" : "2.0", "method" : "UI.AddCommand", "params" : { "cmdID" : 2318, "menuParams" : { "parentID" : 6, "position" : 0, "menuName" : "Show weather for tomorrow", "secondaryText" : "Detroit, MI", "tertiaryText" : "0.8 miles" }, "cmdIcon" : { "value" : "tmp/SDL/app/Gis_meteo/1245_28.jpeg", "imageType" : "DYNAMIC" }, "secondaryImage" : { "value" : "tmp/SDL/app/Gis_meteo/5678.jpeg", "imageType" : "DYNAMIC" }, "appID" : 65409 } }
{ "id" : 215, "jsonrpc" : "2.0", "result" : { "code" : 0, "method" : "UI.AddCommand" } }
{ "id" : 215, "jsonrpc" : "2.0", "error" : { "code" : 13, "message" : "There’s no app with received appID registered", "data" : { "method" : "UI.AddCommand" } } }