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
JavaSE Documentation
SubtleAlert

Class SubtleAlert

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCRequest

Package
com.smartdevicelink.proxy.rpc

Overview

Shows an alert which typically consists of text-to-speech message and text on the display. At least either alertText1, alertText2 or ttsChunks need to be provided.

Parameter List

Param Name Type Description Required Notes Version Available
alertText1 String The first line of the alert text field N Max Value: 500
alertText2 String The second line of the alert text field N Max Value: 500
alertIcon Image Image to be displayed for the corresponding alert. See Image. If omitted on supported displays, no (or the default if applicable) icon should be displayed. N
ttsChunks List An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item. N Min Value: 1; Max Value: 100
duration Integer Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to5s. N Min Value: 3000; Max Value: 10000; Default Value: 5000
softButtons List App defined SoftButtons. If omitted on supported displays, the displayed alert shall not have any SoftButtons. N Min Value: 0; Max Value: 2
cancelID Integer An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC. N

Fields

KEY_ALERT_TEXT_1

public static final java.lang.String KEY_ALERT_TEXT_1
Constant Value
"alertText1"

KEY_ALERT_TEXT_2

public static final java.lang.String KEY_ALERT_TEXT_2
Constant Value
"alertText2"

KEY_ALERT_ICON

public static final java.lang.String KEY_ALERT_ICON
Constant Value
"alertIcon"

KEY_TTS_CHUNKS

public static final java.lang.String KEY_TTS_CHUNKS
Constant Value
"ttsChunks"

KEY_DURATION

public static final java.lang.String KEY_DURATION
Constant Value
"duration"

KEY_SOFT_BUTTONS

public static final java.lang.String KEY_SOFT_BUTTONS
Constant Value
"softButtons"

KEY_CANCEL_ID

public static final java.lang.String KEY_CANCEL_ID
Constant Value
"cancelID"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCRequest onResponseListener
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

SubtleAlert()

Constructs a new SubtleAlert object

public SubtleAlert()

SubtleAlert( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a new SubtleAlert object indicated by the Hashtable parameter

public SubtleAlert(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Constructor Parameters

hash
The Hashtable to use

Methods

setAlertText1( String alertText1 )

Sets the alertText1.

public com.smartdevicelink.proxy.rpc.SubtleAlert setAlertText1(String alertText1)

Method Parameters

alertText1
The first line of the alert text field

getAlertText1()

Gets the alertText1.

public java.lang.String getAlertText1()

setAlertText2( String alertText2 )

Sets the alertText2.

public com.smartdevicelink.proxy.rpc.SubtleAlert setAlertText2(String alertText2)

Method Parameters

alertText2
The second line of the alert text field

getAlertText2()

Gets the alertText2.

public java.lang.String getAlertText2()

setAlertIcon( Image alertIcon )

Sets the alertIcon.

public com.smartdevicelink.proxy.rpc.SubtleAlert setAlertIcon(Image alertIcon)

Method Parameters

alertIcon
Image to be displayed for the corresponding alert. See Image. If omitted on supported displays, no (or the default if applicable) icon should be displayed.

getAlertIcon()

Gets the alertIcon.

public com.smartdevicelink.proxy.rpc.Image getAlertIcon()

setTtsChunks( java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks )

Sets the ttsChunks.

public com.smartdevicelink.proxy.rpc.SubtleAlert setTtsChunks(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks)

Method Parameters

ttsChunks
An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.

getTtsChunks()

Gets the ttsChunks.

public java.util.List getTtsChunks()

setDuration( Integer duration )

Sets the duration.

public com.smartdevicelink.proxy.rpc.SubtleAlert setDuration(Integer duration)

Method Parameters

duration
Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to 5s.

getDuration()

Gets the duration.

public java.lang.Integer getDuration()

setSoftButtons( java.util.List<com.smartdevicelink.proxy.rpc.SoftButton> softButtons )

Sets the softButtons.

public com.smartdevicelink.proxy.rpc.SubtleAlert setSoftButtons(java.util.List<com.smartdevicelink.proxy.rpc.SoftButton> softButtons)

Method Parameters

softButtons
App defined SoftButtons. If omitted on supported displays, the displayed alert shall not have any SoftButtons.

getSoftButtons()

Gets the softButtons.

public java.util.List getSoftButtons()

setCancelID( Integer cancelID )

Sets the cancelID.

public com.smartdevicelink.proxy.rpc.SubtleAlert setCancelID(Integer cancelID)

Method Parameters

cancelID
An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.

getCancelID()

Gets the cancelID.

public java.lang.Integer getCancelID()

Inherited Methods

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
View on GitHub.com
Previous Section Next Section