java.lang.Object
com.smartdevicelink.proxy.RPCStruct
com.smartdevicelink.proxy.RPCMessage
com.smartdevicelink.proxy.RPCRequest
This class will add a command to the application's Command Menu
Note: A command will be added to the end of the list of elements in the Command Menu under the following conditions:
The set of choices which the application builds using AddCommand can be a mixture of:
HMILevel needs to be FULL, LIMITED or BACKGROUND
Parameter List
Param Name | Type | Description | Req. | Notes | Version Available | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cmdID | Integer | unique ID of the command to add | Y | minvalue:0; maxvalue:2000000000 | SmartDeviceLink 1.0 | ||||||||||
menuParams | ButtonName | Name of the button to unsubscribe. | Y | SmartDeviceLink 1.0 | |||||||||||
vrCommands | String | An array of strings to be used as VR synonyms for this command. If this array is provided, it may not be empty. |
N | minsize:1; maxsize:100 | SmartDeviceLink 1.0 | ||||||||||
cmdIcon | Image | Image struct determining whether static or dynamic icon. If omitted on supported displays, no (or the default if applicable) icon shall be displayed. |
N | SmartDeviceLink 1.0 | |||||||||||
secondaryImage | Image | Optional secondary image struct for menu cell | N |
Quick Jump
FieldsKEY_CMD_ICONpublic static final java.lang.String KEY_CMD_ICON
KEY_MENU_PARAMSpublic static final java.lang.String KEY_MENU_PARAMS
KEY_CMD_IDpublic static final java.lang.String KEY_CMD_ID
KEY_VR_COMMANDSpublic static final java.lang.String KEY_VR_COMMANDS
KEY_SECONDARY_IMAGEpublic static final java.lang.String KEY_SECONDARY_IMAGE
Inherited FieldsConstructorsAddCommand()Constructs a new AddCommand object public AddCommand()
AddCommand( java.util.Hashtable<java.lang.String, java.lang.Object> hash )
Constructs a new AddCommand object indicated by the Hashtable parameter public AddCommand(java.util.Hashtable<java.lang.String, java.lang.Object> hash)
Constructor Parameters
AddCommand( Integer cmdID )Constructs a new AddCommand object public AddCommand(Integer cmdID)
Constructor Parameters
MethodsgetCmdID()
Returns an Integer object representing the Command ID that you want to add public java.lang.Integer getCmdID()
setCmdID( Integer cmdID )
Sets a Unique Command ID that identifies the command. Is returned in an OnCommand notification to identify the command selected by the user public com.smartdevicelink.proxy.rpc.AddCommand setCmdID(Integer cmdID)
Method Parameters
getMenuParams()
Returns a MenuParams object which will defined the command and how it is added to the Command Menu public com.smartdevicelink.proxy.rpc.MenuParams getMenuParams()
setMenuParams( MenuParams menuParams )
Sets Menu parameters If provided, this will define the command and how it is added to the Command MenuIf null, commands will not be accessible through the HMI application menu public com.smartdevicelink.proxy.rpc.AddCommand setMenuParams(MenuParams menuParams)
Method Parameters
getVrCommands()
Gets Voice Recognition Commands public java.util.List getVrCommands()
setVrCommands( java.util.List<java.lang.String> vrCommands )
Sets Voice Recognition Commands If provided, defines one or more VR phrases the recognition of any of which triggers the OnCommand notification with this cmdID If null, commands will not be accessible by voice commands (when the user hits push-to-talk) public com.smartdevicelink.proxy.rpc.AddCommand setVrCommands(java.util.List<java.lang.String> vrCommands)
Method Parameters
getCmdIcon()
Gets the image to be shown along with a command public com.smartdevicelink.proxy.rpc.Image getCmdIcon()
setCmdIcon( Image cmdIcon )
Sets the Image If provided, defines the image to be be shown along with a command public com.smartdevicelink.proxy.rpc.AddCommand setCmdIcon(Image cmdIcon)
Method Parameters
setSecondaryImage( Image secondaryImage )Sets the secondaryImage. public com.smartdevicelink.proxy.rpc.AddCommand setSecondaryImage(Image secondaryImage)
Method Parameters
getSecondaryImage()Gets the secondaryImage. public com.smartdevicelink.proxy.rpc.Image getSecondaryImage()
Inherited Methods
|