java.lang.Object
com.smartdevicelink.proxy.RPCStruct
com.smartdevicelink.proxy.RPCMessage
com.smartdevicelink.proxy.RPCRequest
Add a SubMenu to the Command Menu
A SubMenu can only be added to the Top Level Menu (i.e.a SubMenu cannot be added to a SubMenu), and may only contain commands as children
HMILevel needs to be FULL, LIMITED or BACKGROUND
Parameter List
Param Name | Type | Description | Req. | Notes | Version Available |
---|---|---|---|---|---|
menuID | Integer | Unique ID that identifies this sub menu. This value is used in AddCommand to which SubMenu is the parent of the command being added. | Y | SmartDeviceLink 1.0 | |
position | Integer | Position within the items of the top level Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc. Position of any submenu will always be located before the return and exit options. | N | Min Value: 0 Max Value: 1000 If position is greater or equal than the number of items on top level, the sub menu will be appended by the end. If this parameter is omitted, the entry will be added at the end of the list. |
SmartDeviceLink 1.0 |
menuName | String | Text which is displayed representing this submenu item | Y | maxlength:500 | SmartDeviceLink 1.0 |
menuIcon | Image | Image to be be shown along with the submenu item | N | SmartDeviceLink 5.0 | |
menuLayout | MenuLayout | Sets the layout of the submenu screen. | N | SmartDeviceLink 6.0 | |
parentID | Integer | unique ID of the sub menu, the command will be added to. If not provided or 0, it will be provided to the top level of the in application menu. | N | Min Value: 0 Max Value: 2000000000 |
SmartDeviceLink 7.0.0 |
secondaryText | String | Optional secondary text to display | N | {"string_min_length": 1, "string_max_length": 500} | SmartDeviceLink 7.1.0 |
tertiaryText | String | Optional tertiary text to display | N | {"string_min_length": 1, "string_max_length": 500} | SmartDeviceLink 7.1.0 |
secondaryImage | Image | Optional secondary image struct for sub-menu cell | N | SmartDeviceLink 7.1.0 |
Indicates that the corresponding request either failed or succeeded. If the response returns with a SUCCESS result code, this means the SubMenu was added to the Command Menu successfully
Non-default Result Codes:
INVALID_ID
DUPLICATE NAME
public static final java.lang.String KEY_POSITION
public static final java.lang.String KEY_MENU_NAME
public static final java.lang.String KEY_MENU_ID
public static final java.lang.String KEY_MENU_ICON
public static final java.lang.String KEY_MENU_LAYOUT
public static final java.lang.String KEY_PARENT_ID
public static final java.lang.String KEY_SECONDARY_TEXT
public static final java.lang.String KEY_TERTIARY_TEXT
public static final java.lang.String KEY_SECONDARY_IMAGE
Constructs a new AddSubMenu object
public AddSubMenu()
Constructs a new AddSubMenu object indicated by the Hashtable parameter
public AddSubMenu(java.util.Hashtable<java.lang.String, java.lang.Object> hash)
Constructs a new AddSubMenu object
public AddSubMenu(Integer menuID,String menuName)
Notes: Min Value: 0; Max Value: 2000000000
Returns an Integer object representing the Menu ID that identifies a sub menu
public java.lang.Integer getMenuID()
Sets a Menu ID that identifies a sub menu.
This value is used in AddCommand to which SubMenu is the parent of the command being added
public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuID(Integer menuID)
Notes: Min Value: 0; Max Value: 2000000000
Returns an Integer object representing the position of menu
public java.lang.Integer getPosition()
Sets a position of menu
public com.smartdevicelink.proxy.rpc.AddSubMenu setPosition(Integer position)
An Integer object representing the position within the items of the top level Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc. Position of any submenu will always be located before the return and exit options
Notes:Returns String which is displayed representing this submenu item
public java.lang.String getMenuName()
Sets a menuName which is displayed representing this submenu item
public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuName(String menuName)
Returns Image to be be shown along with the submenu item
public com.smartdevicelink.proxy.rpc.Image getMenuIcon()
Sets image to be be shown along with the submenu item
public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuIcon(Image menuIcon)
Sets the layout of the submenu screen.
public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuLayout(MenuLayout menuLayout)
Gets the layout of the submenu screen.
public com.smartdevicelink.proxy.rpc.enums.MenuLayout getMenuLayout()
Sets the parentID.
public com.smartdevicelink.proxy.rpc.AddSubMenu setParentID(Integer parentID)
Gets the parentID.
public java.lang.Integer getParentID()
Sets the secondaryText.
public com.smartdevicelink.proxy.rpc.AddSubMenu setSecondaryText(String secondaryText)
Gets the secondaryText.
public java.lang.String getSecondaryText()
Sets the tertiaryText.
public com.smartdevicelink.proxy.rpc.AddSubMenu setTertiaryText(String tertiaryText)
Gets the tertiaryText.
public java.lang.String getTertiaryText()
Sets the secondaryImage.
public com.smartdevicelink.proxy.rpc.AddSubMenu setSecondaryImage(Image secondaryImage)
Gets the secondaryImage.
public com.smartdevicelink.proxy.rpc.Image getSecondaryImage()
From Class | Methods |
---|---|
com.smartdevicelink.proxy.RPCRequest | getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener |
com.smartdevicelink.proxy.RPCMessage | getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong |
com.smartdevicelink.proxy.RPCStruct | getStoreValue, getStore, deserializeJSON, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong, clone, equals, hashCode |
java.lang.Object | getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |