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
JavaScript Suite Documentation
AddCommand

AddCommand Class Reference

Constructors

Instance Methods

Constructors

new AddCommand(parameters)

Initializes an instance of AddCommand.

Instance Methods

addCommand.getCmdID() ⇒ Number

Get the CmdID

Kind: Instance method of AddCommand
Returns: Number - the KEY_CMD_ID value

addCommand.getCmdIcon() ⇒ Image

Get the CmdIcon

Kind: Instance method of AddCommand
Returns: Image - the KEY_CMD_ICON value

addCommand.getMenuParams() ⇒ MenuParams

Get the MenuParams

Kind: Instance method of AddCommand
Returns: MenuParams - the KEY_MENU_PARAMS value

addCommand.getSecondaryImage() ⇒ Image

Get the SecondaryImage

Kind: Instance method of AddCommand
Returns: Image - the KEY_SECONDARY_IMAGE value

addCommand.getVrCommands() ⇒ Array.<String>

Get the VrCommands

Kind: Instance method of AddCommand
Returns: Array.<String> - the KEY_VR_COMMANDS value

addCommand.setCmdID(id) ⇒ AddCommand

Set the CmdID

Kind: Instance method of AddCommand
Returns: AddCommand - The class instance for method chaining.

ParamTypeDescription
id Number unique ID of the command to add. - The desired CmdID. {'num_min_value': 0, 'num_max_value': 2000000000}

addCommand.setCmdIcon(icon) ⇒ AddCommand

Set the CmdIcon

Kind: Instance method of AddCommand
Returns: AddCommand - The class instance for method chaining.

ParamTypeDescription
icon Image Image struct determining whether static or dynamic icon. If omitted on supported displays, no (or the default if applicable) icon shall be displayed. - The desired CmdIcon.

addCommand.setMenuParams(params) ⇒ AddCommand

Set the MenuParams

Kind: Instance method of AddCommand
Returns: AddCommand - The class instance for method chaining.

ParamTypeDescription
params MenuParams Optional sub value containing menu parameters - The desired MenuParams.

addCommand.setSecondaryImage(image) ⇒ AddCommand

Set the SecondaryImage

Kind: Instance method of AddCommand
Returns: AddCommand - The class instance for method chaining.

ParamTypeDescription
image Image Optional secondary image struct for menu cell - The desired SecondaryImage.

addCommand.setVrCommands(commands) ⇒ AddCommand

Set the VrCommands

Kind: Instance method of AddCommand
Returns: AddCommand - The class instance for method chaining.

ParamTypeDescription
commands Array.<String> An array of strings to be used as VR synonyms for this command. If this array is provided, it may not be empty. - The desired VrCommands. {'array_min_size': 1, 'array_max_size': 100, 'string_min_length': 1, 'string_max_length': 99}
View on GitHub.com
Previous Section Next Section