java.lang.Object
com.smartdevicelink.proxy.RPCStruct
com.smartdevicelink.proxy.RPCMessage
com.smartdevicelink.proxy.RPCRequest
If connecting to SDL Core v.6.0+, the alert can be canceled programmatically using the `cancelID`. Canceling will not dismiss the alert's speech - only the modal view will be dismissed. On older versions of SDL Core, the alert will persist until the user has interacted with the alert or the specified timeout has elapsed.
HMILevel needs to be FULL or LIMITED.
If the app has been granted function group Notification the HMILevel can also be BACKGROUNDName | Type | Description | Req. | Notes | Version Available |
---|---|---|---|---|---|
alertText1 | String | Text to be displayed in the first field of the display during the Alert. | N | Length is limited to what is indicated in RegisterAppInterface response. If omitted, top display line will be cleared. Text is always centered | SmartDeviceLink 1.0 |
alertText2 | String | Text to be displayed in the second field of the display during the Alert. | N | Only permitted if HMI supports a second display line. Length is limited to what is indicated in RegisterAppInterface response. If omitted, second display line will be cleared. | SmartDeviceLink 1.0 |
alertText3 | String | Text to be displayed in the third field of the display during the Alert. | N | Array must have a least one element. | SmartDeviceLink 1.0 |
ttsChunks | TTSChunk[] | Array of type TTSChunk which, taken together, specify what is to be spoken to the user. | N | Array must have a least one element. | SmartDeviceLink 1.0 |
duration | Integer | The duration of the displayed portion of the alert, in milliseconds. After this amount of time has passed, the display fields alertText1 and alertText2 will revert to what was displayed in those fields before the alert began. | N | Min Value: 3000 Max Value: 10000. If omitted, the default is 5000 milliseconds | SmartDeviceLink 1.0 |
playTone | Boolean | Specifies whether the alert tone should be played before the TTS (if any) is spoken. | N | If omitted, default is true. | SmartDeviceLink 1.0 |
softButtons | SoftButton[] | Specifies the soft buttons, the apps wants to use in this alert. | N | If omitted on supported displays, the alert will not have any SoftButton.ArrayMin: 0; ArrayMax: 4 | SmartDeviceLink 1.0 |
progressIndicator | Boolean | If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc. | N | SmartDeviceLink 1.0 | |
cancelID | Integer | An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC. | N | SmartDeviceLink 6.0 | |
alertIcon | Image | Image struct determining whether the icon is static or dynamic. If omitted on supported displays, no (or the default if applicable) icon should be displayed. | N | SmartDeviceLink 6.0.0 |
public static final java.lang.String KEY_PLAY_TONE
public static final java.lang.String KEY_DURATION
public static final java.lang.String KEY_ALERT_TEXT_1
public static final java.lang.String KEY_ALERT_TEXT_2
public static final java.lang.String KEY_ALERT_TEXT_3
public static final java.lang.String KEY_PROGRESS_INDICATOR
public static final java.lang.String KEY_TTS_CHUNKS
public static final java.lang.String KEY_SOFT_BUTTONS
public static final java.lang.String KEY_CANCEL_ID
public static final java.lang.String KEY_ALERT_ICON
Constructs a new Alert object
public Alert()
Constructs a new Alert object indicated by the Hashtable parameter
public Alert(java.util.Hashtable<java.lang.String, java.lang.Object> hash)
Gets the text which is displayed in the first field of the display during the Alert
public java.lang.String getAlertText1()
Sets the String to be displayed in the first field of the display during the Alert
public com.smartdevicelink.proxy.rpc.Alert setAlertText1(String alertText1)
Gets the text which is displayed in the second field of the display during the Alert
public java.lang.String getAlertText2()
Sets the String to be displayed in the second field of the display during the Alert
public com.smartdevicelink.proxy.rpc.Alert setAlertText2(String alertText2)
Gets the text which is displayed in the third field of the display during the Alert
public java.lang.String getAlertText3()
Sets the String to be displayed in the third field of the display during the Alert
public com.smartdevicelink.proxy.rpc.Alert setAlertText3(String alertText3)
Gets TTSChunk[], the Array of type TTSChunk which, taken together, specify what is to be spoken to the user
public java.util.List getTtsChunks()
Sets array of type TTSChunk which, taken together, specify what is to be spoken to the user
public com.smartdevicelink.proxy.rpc.Alert setTtsChunks(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks)
Notes: Array must have a least one element
Gets the duration of the displayed portion of the alert, in milliseconds
public java.lang.Integer getDuration()
Sets the duration of the displayed portion of the alert, in milliseconds. After this amount of time has passed, the display fields alertText1 and alertText2 will revert to what was displayed in those fields before the alert began
public com.smartdevicelink.proxy.rpc.Alert setDuration(Integer duration)
Gets a Boolean value representing the alert tone
public java.lang.Boolean getPlayTone()
Sets whether the alert tone should be played before the TTS (if any) is spoken
public com.smartdevicelink.proxy.rpc.Alert setPlayTone(Boolean playTone)
Notes: If omitted, default is true
Gets the SoftButton List object
public java.util.List getSoftButtons()
Sets the SoftButtons
public com.smartdevicelink.proxy.rpc.Alert setSoftButtons(java.util.List<com.smartdevicelink.proxy.rpc.SoftButton> softButtons)
Gets a Boolean value representing the progress indicator
public java.lang.Boolean getProgressIndicator()
Sets whether the progress indicator should be shown
public com.smartdevicelink.proxy.rpc.Alert setProgressIndicator(Boolean progressIndicator)
Gets an Integer value representing the cancel ID
public java.lang.Integer getCancelID()
Sets the cancel ID
public com.smartdevicelink.proxy.rpc.Alert setCancelID(Integer cancelID)
Sets the Image If provided, defines the image to be shown along with the alert
public com.smartdevicelink.proxy.rpc.Alert setAlertIcon(Image alertIcon)
Gets the image to be shown along with the alert
public com.smartdevicelink.proxy.rpc.Image getAlertIcon()
From Class | Methods |
---|---|
com.smartdevicelink.proxy.RPCRequest | getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener |
com.smartdevicelink.proxy.RPCMessage | getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong |
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 |