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
VoiceCommand

VoiceCommand Class Reference

Constructors

Instance Methods

Constructors

new VoiceCommand(voiceCommands, voiceCommandSelectionListener)

Initializes an instance of VoiceCommand. NOTE: voiceCommands is poorly named. They are more like voice aliases, which map to a single voice command

Instance Methods

voiceCommand.clone() ⇒ VoiceCommand

Creates a deep copy of the object

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

voiceCommand.equals(other) ⇒ Boolean

Checks whether two VoiceCommands can be considered equivalent

Kind: Instance method of VoiceCommand
Returns: Boolean - Whether the objects are the same or not

ParamTypeDescription
other VoiceCommand The object to compare

voiceCommand.getVoiceCommandSelectionListener() ⇒ [function, null]

The listener that will be called when the command is activated

Kind: Instance method of VoiceCommand
Returns: [function, null] - the listener for this object

voiceCommand.getVoiceCommands() ⇒ Array.<String>

The strings the user can say to activate this voice command

Kind: Instance method of VoiceCommand
Returns: Array.<String> - the List of voice commands

voiceCommand.setVoiceCommandSelectionListener(voiceCommandSelectionListener) ⇒ VoiceCommand

The listener that will be called when the command is activated

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

ParamTypeDescription
voiceCommandSelectionListener function the listener for this object

voiceCommand.setVoiceCommands(voiceCommands) ⇒ VoiceCommand

The strings the user can say to activate this voice command

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

ParamTypeDescription
voiceCommands Array.<String> the list of commands to send to the head unit
View on GitHub.com
Previous Section Next Section