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
JavaScript Suite Documentation
AlertView

AlertView Class Reference

Constructors

Instance Methods

Constructors

new AlertView()

Initializes an instance of AlertView.

Instance Methods

alertView.cancel()

Cancels the alert. If the alert has not yet been sent to Core, it will not be sent. If the alert is already presented on Core, the alert will be immediately dismissed. Canceling an already presented alert will only work if connected to Core versions 6.0+. On older versions of Core, the alert will not be dismissed.

Kind: Instance method of AlertView

alertView.clone() ⇒ AlertView

Creates a deep copy of the object.

Kind: Instance method of AlertView
Returns: AlertView - A deep clone of the object.

alertView.getAudio() ⇒ AlertAudioData

Get the Audio

Kind: Instance method of AlertView
Returns: AlertAudioData audio - See AlertAudioData.

alertView.getDefaultTimeout() ⇒ Number

Get the Timeout

Kind: Instance method of AlertView
Returns: Number - the AlertView._DEFAULT_TIMEOUT value

alertView.getIcon() ⇒ SdlArtwork

Get the AlertIcon

Kind: Instance method of AlertView
Returns: SdlArtwork - the _icon value

alertView.getSecondaryText() ⇒ String

Get the AlertText2

Kind: Instance method of AlertView
Returns: String - the _secondaryText value

alertView.getSoftButtons() ⇒ Array.<SoftButtonObject>

Get the SoftButtons

Kind: Instance method of AlertView
Returns: Array.<SoftButtonObject> - the _softButtons value

alertView.getTertiaryText() ⇒ String

Get the AlertText3

Kind: Instance method of AlertView
Returns: String - the _tertiaryText value

alertView.getText() ⇒ String

Get the AlertText1

Kind: Instance method of AlertView
Returns: String - the _text value

alertView.getTimeout() ⇒ Number

Get the Timeout

Kind: Instance method of AlertView
Returns: Number - the timeout value

alertView.isShowWaitIndicator() ⇒ Boolean

Get the ShowWaitIndicator

Kind: Instance method of AlertView
Returns: Boolean - the _showWaitIndicator value

alertView.setAudio(audio) ⇒ AlertView

Set the Audio

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

ParamTypeDescription
audio AlertAudioData See AlertAudioData.

alertView.setDefaultTimeout(defaultTimeout) ⇒ AlertView

Set this to change the default timeout for all alerts. If a timeout is not set on an individual alert object (or if it is set to 0.0), then it will use this timeout instead. See `timeout` for more details. If this is not set by you, it will default to 5 seconds. The minimum is 3 seconds, the maximum is 10 seconds. If this is set below the minimum, it will be capped at 3 seconds. If this is set above the maximum, it will be capped at 10 seconds.

Kind: Instance method of AlertView
Returns: AlertView - A reference to this instance to support method chaining.

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

alertView.setIcon(icon) ⇒ AlertView

Set the AlertIcon

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

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

alertView.setSecondaryText(secondaryText) ⇒ AlertView

Set the AlertText2

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

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

alertView.setShowWaitIndicator(showWaitIndicator) ⇒ AlertView

Set the ShowWaitIndicator

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

ParamTypeDescription
showWaitIndicator 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.

alertView.setSoftButtons(softButtons) ⇒ AlertView

Set the SoftButtons

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

ParamTypeDescription
softButtons Array.<SoftButtonObject> 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}

alertView.setTertiaryText(tertiaryText) ⇒ AlertView

Set the AlertText3

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

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

alertView.setText(text) ⇒ AlertView

Set the AlertText1

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

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

alertView.setTimeout(timeout) ⇒ AlertView

Set the Timeout

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

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