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
VoiceCommand

Class VoiceCommand

Hierarchy

java.lang.Object

Package
com.smartdevicelink.managers.screen.menu
All Implemented Interfaces
java.lang.Cloneable

Constructors

VoiceCommand( java.util.List<java.lang.String> voiceCommands, VoiceCommandSelectionListener voiceCommandSelectionListener )

Constructor that sets all parameters for this class NOTE: While it is possible to pass in null for the listener, It is the easiest way to know when it was triggered.

public VoiceCommand(java.util.List<java.lang.String> voiceCommands,VoiceCommandSelectionListener voiceCommandSelectionListener)

Constructor Parameters

voiceCommands
The strings the user can say to activate this voice command
voiceCommandSelectionListener
The listener that will be called when the command is activated

Methods

setVoiceCommands( java.util.List<java.lang.String> voiceCommands )

The strings the user can say to activate this voice command

public void setVoiceCommands(java.util.List<java.lang.String> voiceCommands)

Method Parameters

voiceCommands
- the list of commands to send to the head unit

getVoiceCommands()

The strings the user can say to activate this voice command

public java.util.List getVoiceCommands()

setVoiceCommandSelectionListener( VoiceCommandSelectionListener voiceCommandSelectionListener )

The listener that will be called when the command is activated

public void setVoiceCommandSelectionListener(VoiceCommandSelectionListener voiceCommandSelectionListener)

Method Parameters

voiceCommandSelectionListener
- the listener for this object

getVoiceCommandSelectionListener()

The listener that will be called when the command is activated

public com.smartdevicelink.managers.screen.menu.VoiceCommandSelectionListener getVoiceCommandSelectionListener()

hashCode()

Used to compile hashcode for VoiceCommand for use to compare in equals method

public int hashCode()

equals( Object o )

Uses our custom hashCode for VoiceCommand objects

public boolean equals(Object o)

Method Parameters

o
- The object to compare

clone()

Creates a deep copy of the object

public com.smartdevicelink.managers.screen.menu.VoiceCommand clone()

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section