Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

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 BACKGROUD

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
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"

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)

Parameters

hash
The Hashtable to use

AddSubMenu( Integer menuID, String menuName )

Constructs a new AddSubMenu object

public AddSubMenu(Integer menuID,String menuName)

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 void setMenuID(Integer menuID)

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 void setPosition(Integer position)

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 void setMenuName(String menuName)

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 void setMenuIcon(Image menuIcon)

Parameters

menuIcon
Image to be be shown along with the submenu item

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCRequest getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener
com.smartdevicelink.proxy.RPCMessage getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, deserializeJSONObject, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section