public class ChoiceSet extends Object
| Constructor and Description |
|---|
ChoiceSet(String title,
ChoiceSetLayout layout,
Integer timeout,
List<TTSChunk> initialPrompt,
List<TTSChunk> timeoutPrompt,
List<TTSChunk> helpPrompt,
List<VrHelpItem> helpList,
KeyboardProperties customKeyboardConfiguration,
List<ChoiceCell> choices,
ChoiceSetSelectionListener listener)
Constructor with all possible properties.
|
ChoiceSet(String title,
ChoiceSetLayout layout,
Integer timeout,
String initialPrompt,
String timeoutPrompt,
String helpPrompt,
List<VrHelpItem> helpList,
KeyboardProperties customKeyboardConfiguration,
List<ChoiceCell> choices,
ChoiceSetSelectionListener listener)
Constructor with all possible properties.
|
ChoiceSet(String title,
List<ChoiceCell> choices,
ChoiceSetSelectionListener listener)
Initialize with a title, listener, and choices.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the choice set.
|
List<ChoiceCell> |
getChoices()
The choices to be displayed to the user within this choice set.
|
ChoiceSetSelectionListener |
getChoiceSetSelectionListener()
The listener of this choice set, called when the user interacts with it.
|
KeyboardProperties |
getCustomKeyboardConfiguration()
Implement this in order to provide a custom keyboard configuration to just this keyboard.
|
int |
getDefaultTimeout() |
List<TTSChunk> |
getHelpPrompt()
Maps to PerformInteraction.helpPrompt.
|
List<TTSChunk> |
getInitialPrompt()
Maps to PerformInteraction.initialPrompt.
|
ChoiceSetLayout |
getLayout()
Maps to PerformInteraction.interactionLayout.
|
Integer |
getTimeout()
Maps to PerformInteraction.timeout.
|
List<TTSChunk> |
getTimeoutPrompt()
Maps to PerformInteraction.timeoutPrompt.
|
String |
getTitle()
Maps to PerformInteraction.initialText.
|
List<VrHelpItem> |
getVrHelpList()
Maps to PerformInteraction.vrHelp.
|
void |
setChoices(List<ChoiceCell> choices) |
void |
setChoiceSetSelectionListener(ChoiceSetSelectionListener choiceSetSelectionListener) |
void |
setCustomKeyboardConfiguration(KeyboardProperties customKeyboardConfiguration)
Implement this in order to provide a custom keyboard configuration to just this keyboard.
|
void |
setDefaultTimeout(int defaultTimeout)
Set this to change the default timeout for all ChoiceSets.
|
void |
setHelpPrompt(List<TTSChunk> helpPrompt) |
void |
setInitialPrompt(List<TTSChunk> initialPrompt) |
void |
setLayout(ChoiceSetLayout layout) |
void |
setTimeout(Integer timeout)
Maps to PerformInteraction.timeout.
|
void |
setTimeoutPrompt(List<TTSChunk> timeoutPrompt) |
void |
setTitle(String title) |
void |
setVrHelpList(List<VrHelpItem> vrHelpList) |
public ChoiceSet(@NonNull
String title,
@NonNull
List<ChoiceCell> choices,
@NonNull
ChoiceSetSelectionListener listener)
title - - The choice set's titlelistener - - The choice set listener called after the user has interacted with your choice setchoices - - The choices to be displayed to the user for interactionpublic ChoiceSet(@NonNull
String title,
@Nullable
ChoiceSetLayout layout,
@Nullable
Integer timeout,
@Nullable
String initialPrompt,
@Nullable
String timeoutPrompt,
@Nullable
String helpPrompt,
@Nullable
List<VrHelpItem> helpList,
@Nullable
KeyboardProperties customKeyboardConfiguration,
@NonNull
List<ChoiceCell> choices,
@NonNull
ChoiceSetSelectionListener listener)
title - - The choice set's titlelistener - - The choice set listener called after the user has interacted with your choice setlayout - - 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 displayedtimeoutPrompt - - 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)choices - - The list of choices presented to the user either as a manual/touch interaction or via the user's voicecustomKeyboardConfiguration - - Implement this in order to provide a custom keyboard configuration to just this keyboard. To apply default settings to all keyboards, see ScreenManager.setKeyboardConfigurationpublic ChoiceSet(@NonNull
String title,
@Nullable
ChoiceSetLayout layout,
@Nullable
Integer timeout,
@Nullable
List<TTSChunk> initialPrompt,
@Nullable
List<TTSChunk> timeoutPrompt,
@Nullable
List<TTSChunk> helpPrompt,
@Nullable
List<VrHelpItem> helpList,
@Nullable
KeyboardProperties customKeyboardConfiguration,
@NonNull
List<ChoiceCell> choices,
@NonNull
ChoiceSetSelectionListener listener)
title - - The choice set's titlelistener - - The choice set listener called after the user has interacted with your choice setlayout - - 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 displayedtimeoutPrompt - - 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)choices - - The list of choices presented to the user either as a manual/touch interaction or via the user's voicecustomKeyboardConfiguration - - Implement this in order to provide a custom keyboard configuration to just this keyboard. To apply default settings to all keyboards, see ScreenManager.setKeyboardConfigurationpublic void cancel()
public String getTitle()
public void setTitle(String title)
title - - Maps to PerformInteraction.initialText. The title of the choice set, and/or the initial text on a keyboard prompt.public List<TTSChunk> getInitialPrompt()
public void setInitialPrompt(List<TTSChunk> initialPrompt)
initialPrompt - - Maps to PerformInteraction.initialPrompt. The initial prompt spoken to the user at the start of an interaction.public List<TTSChunk> getTimeoutPrompt()
public void setTimeoutPrompt(List<TTSChunk> timeoutPrompt)
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.public List<TTSChunk> getHelpPrompt()
public void setHelpPrompt(List<TTSChunk> helpPrompt)
helpPrompt - - Maps to PerformInteraction.helpPrompt. This is the spoken string when a user
speaks "help" when the interaction is occurring.public List<VrHelpItem> getVrHelpList()
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 void setVrHelpList(List<VrHelpItem> vrHelpList)
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.
public ChoiceSetLayout getLayout()
public void setLayout(ChoiceSetLayout layout)
layout - - Maps to PerformInteraction.interactionLayout. Whether the presented choices
are arranged as a set of tiles or a list.public Integer getTimeout()
public void setTimeout(Integer timeout)
public int getDefaultTimeout()
public void setDefaultTimeout(int defaultTimeout)
public List<ChoiceCell> getChoices()
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 void setChoices(List<ChoiceCell> choices)
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).
public ChoiceSetSelectionListener getChoiceSetSelectionListener()
public void setChoiceSetSelectionListener(ChoiceSetSelectionListener choiceSetSelectionListener)
choiceSetSelectionListener - The listener of this choice set, called when the user interacts with it.public void setCustomKeyboardConfiguration(KeyboardProperties customKeyboardConfiguration)
customKeyboardConfiguration - - the keyboard config used for this choice setpublic KeyboardProperties getCustomKeyboardConfiguration()