public class OnButtonEvent extends RPCNotification
HMI Status Requirements:
| Name | Type | Description | Req | Notes | SmartDeviceLink Ver Available |
|---|---|---|---|---|---|
| buttonName | ButtonName | Name of the button which triggered this event | SmartDeviceLink 1.0 | ||
| buttonEventMode | ButtonEventMode | Indicates button was depressed (DOWN) or released (UP) | SmartDeviceLink 1.0 | ||
| customButtonID | Integer | If ButtonName is CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID) | N | Minvalue=0 Maxvalue=65536 | SmartDeviceLink 2.0 |
SubscribeButton,
UnsubscribeButton| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_BUTTON_EVENT_MODE |
static String |
KEY_BUTTON_NAME |
static String |
KEY_CUSTOM_BUTTON_ID |
function, KEY_CORRELATION_ID, KEY_FUNCTION_NAME, KEY_NOTIFICATION, KEY_PARAMETERS, KEY_REQUEST, KEY_RESPONSE, messageType, parametersKEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
OnButtonEvent()
Constructs a newly allocated OnButtonEvent object
|
OnButtonEvent(ButtonName buttonName,
ButtonEventMode buttonEventMode)
Constructs a newly allocated OnButtonEvent object
|
OnButtonEvent(Hashtable<String,Object> hash)
Constructs a newly allocated OnButtonEvent object indicated by the
Hashtable parameter
|
| Modifier and Type | Method and Description |
|---|---|
ButtonEventMode |
getButtonEventMode()
Return ButtonEventMode indicates the button was depressed or released
|
ButtonName |
getButtonName()
Returns ButtonName the button's name
|
Integer |
getCustomButtonID() |
OnButtonEvent |
setButtonEventMode(ButtonEventMode buttonEventMode)
Set the event mode of the button,pressed or released
|
OnButtonEvent |
setButtonName(ButtonName buttonName)
Set the button's name
|
OnButtonEvent |
setCustomButtonID(Integer customButtonID) |
getBoolean, getDouble, getFloat, getFunctionID, getFunctionName, getInteger, getLong, getMessageType, getObject, getParameters, getString, setFunctionName, setParametersclone, deserializeJSON, equals, format, formatObject, getBulkData, getMessageTypeName, getStore, getStoreValue, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_BUTTON_EVENT_MODE
public static final String KEY_BUTTON_NAME
public static final String KEY_CUSTOM_BUTTON_ID
public OnButtonEvent()
public OnButtonEvent(Hashtable<String,Object> hash)
Constructs a newly allocated OnButtonEvent object indicated by the Hashtable parameter
hash - The Hashtable to use to create this RPCpublic OnButtonEvent(@NonNull
ButtonName buttonName,
@NonNull
ButtonEventMode buttonEventMode)
buttonName - name of the buttonbuttonEventMode - indicates the button is pressed or releasedpublic ButtonName getButtonName()
Returns ButtonName the button's name
public OnButtonEvent setButtonName(@NonNull ButtonName buttonName)
Set the button's name
buttonName - name of the buttonpublic ButtonEventMode getButtonEventMode()
Return ButtonEventMode indicates the button was depressed or released
public OnButtonEvent setButtonEventMode(@NonNull ButtonEventMode buttonEventMode)
Set the event mode of the button,pressed or released
buttonEventMode - indicates the button is pressed or releasedButtonEventModepublic OnButtonEvent setCustomButtonID(Integer customButtonID)
public Integer getCustomButtonID()