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
Documentation
Alert

Alert Class Reference

Constructors

Instance Methods

Constructors

new Alert(parameters)

Initalizes an instance of Alert.

Instance Methods

alert.getAlertIcon() ⇒ Image

Get the AlertIcon

Kind: Instance method of Alert
Returns: Image - the KEY_ALERT_ICON value

alert.getAlertText1() ⇒ String

Get the AlertText1

Kind: Instance method of Alert
Returns: String - the KEY_ALERT_TEXT_1 value

alert.getAlertText2() ⇒ String

Get the AlertText2

Kind: Instance method of Alert
Returns: String - the KEY_ALERT_TEXT_2 value

alert.getAlertText3() ⇒ String

Get the AlertText3

Kind: Instance method of Alert
Returns: String - the KEY_ALERT_TEXT_3 value

alert.getCancelID() ⇒ Number

Get the CancelID

Kind: Instance method of Alert
Returns: Number - the KEY_CANCEL_ID value

alert.getDuration() ⇒ Number

Get the Duration

Kind: Instance method of Alert
Returns: Number - the KEY_DURATION value

alert.getPlayTone() ⇒ Boolean

Get the PlayTone

Kind: Instance method of Alert
Returns: Boolean - the KEY_PLAY_TONE value

alert.getProgressIndicator() ⇒ Boolean

Get the ProgressIndicator

Kind: Instance method of Alert
Returns: Boolean - the KEY_PROGRESS_INDICATOR value

alert.getSoftButtons() ⇒ Array.<SoftButton>

Get the SoftButtons

Kind: Instance method of Alert
Returns: Array.<SoftButton> - the KEY_SOFT_BUTTONS value

alert.getTtsChunks() ⇒ Array.<TTSChunk>

Get the TtsChunks

Kind: Instance method of Alert
Returns: Array.<TTSChunk> - the KEY_TTS_CHUNKS value

alert.setAlertIcon(icon) ⇒ Alert

Set the AlertIcon

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
icon Image Image struct determining whether static or dynamic icon. If omitted on supported displays, no (or the default if applicable) icon should be displayed. - The desired AlertIcon.

alert.setAlertText1(text1) ⇒ Alert

Set the AlertText1

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
text1 String The first line of the alert text field - The desired AlertText1. {'string_min_length': 1, 'string_max_length': 500}

alert.setAlertText2(text2) ⇒ Alert

Set the AlertText2

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
text2 String The second line of the alert text field - The desired AlertText2. {'string_min_length': 1, 'string_max_length': 500}

alert.setAlertText3(text3) ⇒ Alert

Set the AlertText3

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
text3 String The optional third line of the alert text field - The desired AlertText3. {'string_min_length': 1, 'string_max_length': 500}

alert.setCancelID(id) ⇒ Alert

Set the CancelID

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
id Number An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC. - The desired CancelID.

alert.setDuration(duration) ⇒ Alert

Set the Duration

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
duration Number Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to 5s. - The desired Duration. {'num_min_value': 3000, 'num_max_value': 10000}

alert.setPlayTone(tone) ⇒ Alert

Set the PlayTone

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
tone Boolean Defines if tone should be played. Tone is played before TTS. If omitted or provided without ttsChunks, no tone is played. - The desired PlayTone.

alert.setProgressIndicator(indicator) ⇒ Alert

Set the ProgressIndicator

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
indicator 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. - The desired ProgressIndicator.

alert.setSoftButtons(buttons) ⇒ Alert

Set the SoftButtons

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
buttons Array.<SoftButton> App defined SoftButtons. If omitted on supported displays, the displayed alert shall not have any SoftButtons. - The desired SoftButtons. {'array_min_size': 0, 'array_max_size': 4}

alert.setTtsChunks(chunks) ⇒ Alert

Set the TtsChunks

Kind: Instance method of Alert
Returns: Alert - The class instance for method chaining.

ParamTypeDescription
chunks Array.<TTSChunk> An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item. - The desired TtsChunks. {'array_min_size': 1, 'array_max_size': 100}
View on GitHub.com
Previous Section Next Section