Class ChoiceSet
Hierarchy
java.lang.Object
- Package
- com.smartdevicelink.managers.screen.choiceset
Quick Jump
- Constructors
-
- ChoiceSet(
String title,
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,
ChoiceSetSelectionListener listener
)
- ChoiceSet(
String title,
ChoiceSetLayout layout,
Integer timeout,
String initialPrompt,
String timeoutPrompt,
String helpPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> helpList,
KeyboardProperties customKeyboardConfiguration,
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,
ChoiceSetSelectionListener listener
)
- ChoiceSet(
String title,
ChoiceSetLayout layout,
Integer timeout,
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> helpList,
KeyboardProperties customKeyboardConfiguration,
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,
ChoiceSetSelectionListener listener
)
- Methods
-
Constructors
ChoiceSet(
String title,
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,
ChoiceSetSelectionListener listener
)
Initialize with a title, listener, and choices. It will use the default timeout and layout,
all other properties (such as prompts) will be `null`.
public ChoiceSet(String title,java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,ChoiceSetSelectionListener listener)
Parameters
- title
- - The choice set's title
- choices
- - The choices to be displayed to the user for interaction
- listener
- - The choice set listener called after the user has interacted with your choice set
ChoiceSet(
String title,
ChoiceSetLayout layout,
Integer timeout,
String initialPrompt,
String timeoutPrompt,
String helpPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> helpList,
KeyboardProperties customKeyboardConfiguration,
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,
ChoiceSetSelectionListener listener
)
Constructor with all possible properties.
public ChoiceSet(String title,ChoiceSetLayout layout,Integer timeout,String initialPrompt,String timeoutPrompt,String helpPrompt,java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> helpList,KeyboardProperties customKeyboardConfiguration,java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,ChoiceSetSelectionListener listener)
Parameters
- title
- - The choice set's title
- layout
- - The layout of choice options (Manual/touch only)
- timeout
- - The timeout of a touch interaction (Manual/touch only). This is set to seconds if using the screen manager.
- initialPrompt
- - A voice prompt spoken to the user when this set is displayed
- timeoutPrompt
- - A voice prompt spoken to the user when the set times out (Voice only)
- helpPrompt
- - A voice prompt spoken to the user when the user asks for "help"
- helpList
- - A table list of text and images shown to the user during a voice recognition session for this choice set (Voice only)
- customKeyboardConfiguration
- - Implement this in order to provide a custom keyboard configuration to just this keyboard. To apply default settings to all keyboards, see ScreenManager.setKeyboardConfiguration
- choices
- - The list of choices presented to the user either as a manual/touch interaction or via the user's voice
- listener
- - The choice set listener called after the user has interacted with your choice set
ChoiceSet(
String title,
ChoiceSetLayout layout,
Integer timeout,
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt,
java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> helpList,
KeyboardProperties customKeyboardConfiguration,
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,
ChoiceSetSelectionListener listener
)
Constructor with all possible properties.
public ChoiceSet(String title,ChoiceSetLayout layout,Integer timeout,java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt,java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt,java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt,java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> helpList,KeyboardProperties customKeyboardConfiguration,java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,ChoiceSetSelectionListener listener)
Parameters
- title
- - The choice set's title
- layout
- - The layout of choice options (Manual/touch only)
- timeout
- - The timeout of a touch interaction (Manual/touch only). This is set to seconds if using the screen manager.
- initialPrompt
- - A voice prompt spoken to the user when this set is displayed
- timeoutPrompt
- - A voice prompt spoken to the user when the set times out (Voice only)
- helpPrompt
- - A voice prompt spoken to the user when the user asks for "help"
- helpList
- - A table list of text and images shown to the user during a voice recognition session for this choice set (Voice only)
- customKeyboardConfiguration
- - Implement this in order to provide a custom keyboard configuration to just this keyboard. To apply default settings to all keyboards, see ScreenManager.setKeyboardConfiguration
- choices
- - The list of choices presented to the user either as a manual/touch interaction or via the user's voice
- listener
- - The choice set listener called after the user has interacted with your choice set
Methods
cancel()
Cancels the choice set. If the choice set has not yet been sent to Core, it will not be sent. If the choice set is already presented on Core, the choice set will be immediately dismissed. Canceling an already presented choice set will only work if connected to Core versions 6.0+. On older versions of Core, the choice set will not be dismissed.
getTitle()
Maps to PerformInteraction.initialText. The title of the choice set, and/or the initial text on a keyboard prompt.
public java.lang.String getTitle()
setTitle(
String title
)
public void setTitle(String title)
Parameters
- title
- - Maps to PerformInteraction.initialText. The title of the choice set, and/or the initial text on a keyboard prompt.
getInitialPrompt()
Maps to PerformInteraction.initialPrompt. The initial prompt spoken to the user at the start of an interaction.
public java.util.List getInitialPrompt()
setInitialPrompt(
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt
)
public void setInitialPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt)
Parameters
- initialPrompt
- - Maps to PerformInteraction.initialPrompt. The initial prompt spoken to the user at the start of an interaction.
getTimeoutPrompt()
Maps to PerformInteraction.timeoutPrompt. This text is spoken when a VR interaction times out.
If this set is presented in a manual (non-voice) only interaction, this will be ignored.
public java.util.List getTimeoutPrompt()
setTimeoutPrompt(
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt
)
public void setTimeoutPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt)
Parameters
- timeoutPrompt
- - Maps to PerformInteraction.timeoutPrompt. This text is spoken when a
VR interaction times out. If this set is presented in a manual (non-voice) only interaction, this will be ignored.
getHelpPrompt()
Maps to PerformInteraction.helpPrompt. This is the spoken string when a user speaks "help" when the interaction is occurring.
public java.util.List getHelpPrompt()
setHelpPrompt(
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt
)
public void setHelpPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt)
Parameters
- helpPrompt
- - Maps to PerformInteraction.helpPrompt. This is the spoken string when a user
speaks "help" when the interaction is occurring.
getVrHelpList()
Maps to PerformInteraction.vrHelp. This is a list of help text presented to the user when
they are in a voice recognition interaction from your choice set of options. If this set is
presented in a touch only interaction, this will be ignored.
Note: That while VRHelpItem's position will be automatically set based on position in the
array, the image will need to uploaded by you before use using the FileManager.
public java.util.List getVrHelpList()
setVrHelpList(
java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> vrHelpList
)
public void setVrHelpList(java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> vrHelpList)
Parameters
- vrHelpList
- - Maps to PerformInteraction.vrHelp. This is a list of help text presented to the user when
they are in a voice recognition interaction from your choice set of options. If this set is
presented in a touch only interaction, this will be ignored.
Note: That while SDLVRHelpItem's position will be automatically set based on position in the
array, the image will need to uploaded by you before use using the FileManager.
getLayout()
Maps to PerformInteraction.interactionLayout. Whether the presented choices are arranged as
a set of tiles or a list.
public com.smartdevicelink.managers.screen.choiceset.ChoiceSetLayout getLayout()
setLayout(
ChoiceSetLayout layout
)
public void setLayout(ChoiceSetLayout layout)
Parameters
- layout
- - Maps to PerformInteraction.interactionLayout. Whether the presented choices
are arranged as a set of tiles or a list.
getTimeout()
Maps to PerformInteraction.timeout. This applies only to a manual selection (not a voice
selection, which has its timeout handled by the system). Defaults to `defaultTimeout`.
public java.lang.Integer getTimeout()
setTimeout(
Integer timeout
)
public void setTimeout(Integer timeout)
Parameters
- timeout
- - Maps to PerformInteraction.timeout. This applies only to a manual selection
(not a voice selection, which has its timeout handled by the system). Defaults to `defaultTimeout`.
This is set to seconds if using the screen manager.
getChoices()
The choices to be displayed to the user within this choice set. These choices could match
those already preloaded
This is limited to 100 items. If you attempt to set more than 100 items, the set will not
have any items (this array will be empty).
public java.util.List getChoices()
setChoices(
java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices
)
public void setChoices(java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices)
Parameters
- choices
- - The choices to be displayed to the user within this choice set. These choices could match
those already preloaded
This is limited to 100 items. If you attempt to set more than 100 items, the set will not
have any items (this array will be empty).
getChoiceSetSelectionListener()
The listener of this choice set, called when the user interacts with it.
public com.smartdevicelink.managers.screen.choiceset.ChoiceSetSelectionListener getChoiceSetSelectionListener()
setChoiceSetSelectionListener(
ChoiceSetSelectionListener choiceSetSelectionListener
)
public void setChoiceSetSelectionListener(ChoiceSetSelectionListener choiceSetSelectionListener)
Parameters
- choiceSetSelectionListener
- The listener of this choice set, called when the user interacts with it.
setCustomKeyboardConfiguration(
KeyboardProperties customKeyboardConfiguration
)
Implement this in order to provide a custom keyboard configuration to just this keyboard.
To apply default settings to all keyboards, see ScreenManager.setKeyboardConfiguration
public void setCustomKeyboardConfiguration(KeyboardProperties customKeyboardConfiguration)
Parameters
- customKeyboardConfiguration
- - the keyboard config used for this choice set
getCustomKeyboardConfiguration()
Implement this in order to provide a custom keyboard configuration to just this keyboard.
To apply default settings to all keyboards, see ScreenManager.setKeyboardConfiguration
public com.smartdevicelink.proxy.rpc.KeyboardProperties getCustomKeyboardConfiguration()
Inherited Methods
From Class |
Methods |
java.lang.Object
|
getClass,
hashCode,
equals,
clone,
toString,
notify,
notifyAll,
wait,
wait,
wait,
finalize
|
View on GitHub.com