Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Documentation
AddSubMenu

Class AddSubMenu

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCRequest

Package
com.smartdevicelink.proxy.rpc

Overview

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
Response

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

Fields

KEY_POSITION

public static final java.lang.String KEY_POSITION
Constant Value
"position"

KEY_MENU_NAME

public static final java.lang.String KEY_MENU_NAME
Constant Value
"menuName"

KEY_MENU_ID

public static final java.lang.String KEY_MENU_ID
Constant Value
"menuID"

KEY_MENU_ICON

public static final java.lang.String KEY_MENU_ICON
Constant Value
"menuIcon"

KEY_MENU_LAYOUT

public static final java.lang.String KEY_MENU_LAYOUT
Constant Value
"menuLayout"

KEY_PARENT_ID

public static final java.lang.String KEY_PARENT_ID
Constant Value
"parentID"

KEY_SECONDARY_TEXT

public static final java.lang.String KEY_SECONDARY_TEXT
Constant Value
"secondaryText"

KEY_TERTIARY_TEXT

public static final java.lang.String KEY_TERTIARY_TEXT
Constant Value
"tertiaryText"

KEY_SECONDARY_IMAGE

public static final java.lang.String KEY_SECONDARY_IMAGE
Constant Value
"secondaryImage"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCRequest onResponseListener
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

AddSubMenu()

Constructs a new AddSubMenu object

public AddSubMenu()

AddSubMenu( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a new AddSubMenu object indicated by the Hashtable parameter

public AddSubMenu(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Constructor Parameters

hash
The Hashtable to use

AddSubMenu( Integer menuID, String menuName )

Constructs a new AddSubMenu object

public AddSubMenu(Integer menuID,String menuName)

Constructor Parameters

menuID
an integer object representing a Menu ID

Notes: Min Value: 0; Max Value: 2000000000

menuName
String which will be displayed representing this submenu item

Methods

getMenuID()

Returns an Integer object representing the Menu ID that identifies a sub menu

public java.lang.Integer getMenuID()

setMenuID( Integer menuID )

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)

Method Parameters

menuID
an integer object representing a Menu ID

Notes: Min Value: 0; Max Value: 2000000000

getPosition()

Returns an Integer object representing the position of menu

public java.lang.Integer getPosition()

setPosition( Integer position )

Sets a position of menu

public com.smartdevicelink.proxy.rpc.AddSubMenu setPosition(Integer position)

Method Parameters

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:
  • Min Value: 0; Max Value: 1000
  • If position is greater than or equal to 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

getMenuName()

Returns String which is displayed representing this submenu item

public java.lang.String getMenuName()

setMenuName( String menuName )

Sets a menuName which is displayed representing this submenu item

public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuName(String menuName)

Method Parameters

menuName
String which will be displayed representing this submenu item

getMenuIcon()

Returns Image to be be shown along with the submenu item

public com.smartdevicelink.proxy.rpc.Image getMenuIcon()

setMenuIcon( Image menuIcon )

Sets image to be be shown along with the submenu item

public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuIcon(Image menuIcon)

Method Parameters

menuIcon
Image to be be shown along with the submenu item

setMenuLayout( MenuLayout menuLayout )

Sets the layout of the submenu screen.

public com.smartdevicelink.proxy.rpc.AddSubMenu setMenuLayout(MenuLayout menuLayout)

Method Parameters

menuLayout
- the menuLayout

getMenuLayout()

Gets the layout of the submenu screen.

public com.smartdevicelink.proxy.rpc.enums.MenuLayout getMenuLayout()

setParentID( Integer parentID )

Sets the parentID.

public com.smartdevicelink.proxy.rpc.AddSubMenu setParentID(Integer parentID)

Method Parameters

parentID
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.

getParentID()

Gets the parentID.

public java.lang.Integer getParentID()

setSecondaryText( String secondaryText )

Sets the secondaryText.

public com.smartdevicelink.proxy.rpc.AddSubMenu setSecondaryText(String secondaryText)

Method Parameters

secondaryText
Optional secondary text to display {"string_min_length": 1, "string_max_length": 500}

getSecondaryText()

Gets the secondaryText.

public java.lang.String getSecondaryText()

setTertiaryText( String tertiaryText )

Sets the tertiaryText.

public com.smartdevicelink.proxy.rpc.AddSubMenu setTertiaryText(String tertiaryText)

Method Parameters

tertiaryText
Optional tertiary text to display {"string_min_length": 1, "string_max_length": 500}

getTertiaryText()

Gets the tertiaryText.

public java.lang.String getTertiaryText()

setSecondaryImage( Image secondaryImage )

Sets the secondaryImage.

public com.smartdevicelink.proxy.rpc.AddSubMenu setSecondaryImage(Image secondaryImage)

Method Parameters

secondaryImage
Optional secondary image struct for sub-menu cell

getSecondaryImage()

Gets the secondaryImage.

public com.smartdevicelink.proxy.rpc.Image getSecondaryImage()

Inherited Methods

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
View on GitHub.com
Previous Section Next Section