java.lang.Object
com.smartdevicelink.proxy.RPCStruct
Parameter List
Name | Type | Description | SmartDeviceLink Ver. Available |
---|---|---|---|
choiceID | Integer | Application-scoped identifier that uniquely identifies this choice. Min: 0; Max: 65535 | SmartDeviceLink 1.0 |
menuName | String | Text which appears in menu, representing this choice. Min: 1; Max: 100 | SmartDeviceLink 1.0 |
vrCommands | String[] | An array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element | SmartDeviceLink 1.0 |
image | Image | Either a static hex icon value or a binary image file name identifier (sent by PutFile). | SmartDeviceLink 2.0 |
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
public static final java.lang.String KEY_MENU_NAME
public static final java.lang.String KEY_VR_COMMANDS
public static final java.lang.String KEY_CHOICE_ID
public static final java.lang.String KEY_IMAGE
From Class | Fields |
---|---|
com.smartdevicelink.proxy.RPCStruct | KEY_BULK_DATA, KEY_PROTECTED, store |
Constructs a newly allocated Choice object
public Choice()
Constructs a newly allocated Choice object indicated by the Hashtable parameter
public Choice(java.util.Hashtable<java.lang.String, java.lang.Object> hash)
Constructs a newly allocated Choice object
public Choice(Integer choiceID,String menuName)
VrCommands became optional as of RPC Spec 5.0. On legacy systems, we must still set VrCommands, as
they are expected, even though the developer may not specify them.
Additionally, VrCommands must be unique, therefore we will use the string value of the command's ID
public void format(Version rpcVersion,boolean formatParams)
Get the application-scoped identifier that uniquely identifies this choice.
public java.lang.Integer getChoiceID()
Set the application-scoped identifier that uniquely identifies this choice.
public com.smartdevicelink.proxy.rpc.Choice setChoiceID(Integer choiceID)
Text which appears in menu, representing this choice. Min: 1; Max: 100
public java.lang.String getMenuName()
Text which appears in menu, representing this choice. Min: 1; Max: 100
public com.smartdevicelink.proxy.rpc.Choice setMenuName(String menuName)
Get an array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element
public java.util.List getVrCommands()
Set an array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element
public com.smartdevicelink.proxy.rpc.Choice setVrCommands(java.util.List<java.lang.String> vrCommands)
Set the image
public com.smartdevicelink.proxy.rpc.Choice setImage(Image image)
Get the image
public com.smartdevicelink.proxy.rpc.Image getImage()
public java.lang.String getSecondaryText()
public com.smartdevicelink.proxy.rpc.Choice setSecondaryText(String secondaryText)
public java.lang.String getTertiaryText()
public com.smartdevicelink.proxy.rpc.Choice setTertiaryText(String tertiaryText)
public com.smartdevicelink.proxy.rpc.Choice setSecondaryImage(Image image)
public com.smartdevicelink.proxy.rpc.Image getSecondaryImage()
This prevents the @{link Choice#format} method from adding VR commands if set to true
public com.smartdevicelink.proxy.rpc.Choice setIgnoreAddingVRItems(boolean ignoreAddingVRItems)
From Class | Methods |
---|---|
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 |