Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class Alert

Hierarchy

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

Package
com.smartdevicelink.proxy.rpc

Overview

Provides information to the user using either TTS, the Display or both and can include a system-generated alert tone
  • The displayed portion of the Alert, if any, will persist until the specified timeout has elapsed, or the Alert is preempted
  • An Alert will preempt (abort) any SmartDeviceLink Operation that is in-progress, except an already-in-progress Alert
  • An Alert cannot be preempted by any SmartDeviceLink Operation
  • An Alert can be preempted by a user action (button push)
  • An Alert will fail if it is issued while another Alert is in progress
  • Although each Alert parameter is optional, in fact each Alert request must supply at least one of the following parameters:
    • alertText1
    • alertText2
    • alertText3
    • ttsChunks

HMILevel needs to be FULL or LIMITED.

If the app has been granted function group Notification the HMILevel can also be BACKGROUND
Name 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 softbuttons, the apps wants to use in this alert. 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

Fields

KEY_PLAY_TONE

public static final java.lang.String KEY_PLAY_TONE
Constant Value
"playTone"

KEY_DURATION

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

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_TEXT_3

public static final java.lang.String KEY_ALERT_TEXT_3
Constant Value
"alertText3"

KEY_PROGRESS_INDICATOR

public static final java.lang.String KEY_PROGRESS_INDICATOR
Constant Value
"progressIndicator"

KEY_TTS_CHUNKS

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

KEY_SOFT_BUTTONS

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

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

Alert()

Constructs a new Alert object

public Alert()

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

Constructs a new Alert object indicated by the Hashtable parameter

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

Parameters

hash
The Hashtable to use

Methods

getAlertText1()

Gets the text which is displayed in the first field of the display during the Alert

public java.lang.String getAlertText1()

setAlertText1( String alertText1 )

Sets the String to be displayed in the first field of the display during the Alert

public void setAlertText1(String alertText1)

Parameters

alertText1
String Value

Notes:

  • Length is limited to what is indicated in {@linkplain RegisterAppInterface} response
  • If omitted, top display line will be cleared
  • Text is always centered

getAlertText2()

Gets the text which is displayed in the second field of the display during the Alert

public java.lang.String getAlertText2()

setAlertText2( String alertText2 )

Sets the String to be displayed in the second field of the display during the Alert

public void setAlertText2(String alertText2)

Parameters

alertText2
String Value

Notes:

  • Only permitted if HMI supports a second display line
  • Length is limited to what is indicated in {@linkplain RegisterAppInterface} response
  • If omitted, second display line will be cleared
  • Text is always centered

getAlertText3()

Gets the text which is displayed in the third field of the display during the Alert

public java.lang.String getAlertText3()

setAlertText3( String alertText3 )

Sets the String to be displayed in the third field of the display during the Alert

public void setAlertText3(String alertText3)

Parameters

alertText3
String Value

Notes:

  • Only permitted if HMI supports a third display line
  • Length is limited to what is indicated in {@linkplain RegisterAppInterface} response
  • If omitted, third display line will be cleared
  • Text is always centered

getTtsChunks()

Gets TTSChunk[], the Array of type TTSChunk which, taken together, specify what is to be spoken to the user

public java.util.List getTtsChunks()

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

Sets array of type TTSChunk which, taken together, specify what is to be spoken to the user

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

Parameters

ttsChunks

Notes: Array must have a least one element

getDuration()

Gets the duration of the displayed portion of the alert, in milliseconds

public java.lang.Integer getDuration()

setDuration( Integer duration )

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 void setDuration(Integer duration)

Parameters

duration
the Integer values representing the duration time, in milliseconds

Notes:

  • Min Value: 3000; Max Value: 10000
  • If omitted, the default is 5000 milliseconds

getPlayTone()

Gets a Boolean value representing the alert tone

public java.lang.Boolean getPlayTone()

setPlayTone( Boolean playTone )

Sets whether the alert tone should be played before the TTS (if any) is spoken

public void setPlayTone(Boolean playTone)

Parameters

playTone
a Boolean value which specifies whether the alert tone should be played before the TTS (if any) is spoken

Notes: If omitted, default is true

getSoftButtons()

Gets the SoftButton List object

public java.util.List getSoftButtons()

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

Sets the SoftButtons

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

Parameters

softButtons
a List value

Notes:

  • If omitted on supported displays, the alert will not have any SoftButton
  • ArrayMin: 0
  • ArrayMax: 4

getProgressIndicator()

public java.lang.Boolean getProgressIndicator()

setProgressIndicator( Boolean progressIndicator )

public void setProgressIndicator(Boolean progressIndicator)

Parameters

progressIndicator

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCRequest getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener
com.smartdevicelink.proxy.RPCMessage getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, deserializeJSONObject, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section