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
JavaEE Documentation
ChoiceSet

Class ChoiceSet

Hierarchy

java.lang.Object

Package
com.smartdevicelink.managers.screen.choiceset

Quick Jump

Constructors
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`. NOTE: If you display multiple cells with the same `text` with the only uniquing property between cells being different `vrCommands` or a feature that is not displayed on the head unit (e.g. if the head unit doesn't display `secondaryArtwork` and that's the only uniquing property between two cells) then the cells may appear to be the same to the user in `Manual` mode. This only applies to RPC connections >= 7.1.0. NOTE: On < 7.1.0 connections, the `text` cell will be automatically modified among cells that have the same `text` when they are preloaded, so they will always appear differently on-screen when they are displayed. `choiceCell.uniqueText` will be created by appending ` (2)`, ` (3)`, etc.

public ChoiceSet(String title,java.util.List<com.smartdevicelink.managers.screen.choiceset.ChoiceCell> choices,ChoiceSetSelectionListener listener)

Constructor 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. NOTE: If you display multiple cells with the same `text` with the only uniquing property between cells being different `vrCommands` or a feature that is not displayed on the head unit (e.g. if the head unit doesn't display `secondaryArtwork` and that's the only uniquing property between two cells) then the cells may appear to be the same to the user in `Manual` mode. This only applies to RPC connections >= 7.1.0. NOTE: On < 7.1.0 connections, the `text` cell will be automatically modified among cells that have the same `text` when they are preloaded, so they will always appear differently on-screen when they are displayed. `choiceCell.uniqueText` will be created by appending ` (2)`, ` (3)`, etc.

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)

Constructor 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. NOTE: If you display multiple cells with the same `text` with the only uniquing property between cells being different `vrCommands` or a feature that is not displayed on the head unit (e.g. if the head unit doesn't display `secondaryArtwork` and that's the only uniquing property between two cells) then the cells may appear to be the same to the user in `Manual` mode. This only applies to RPC connections >= 7.1.0. NOTE: On < 7.1.0 connections, the `text` cell will be automatically modified among cells that have the same `text` when they are preloaded, so they will always appear differently on-screen when they are displayed. `choiceCell.uniqueText` will be created by appending ` (2)`, ` (3)`, etc.

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)

Constructor 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.

public void cancel()

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)

Method 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)

Method 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)

Method 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)

Method 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)

Method 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)

Method 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 )

Maps to PerformInteraction.timeout. Timeout in seconds. Defaults to 0, which will use `defaultTimeout`. If this is set below the minimum, it will be capped at 5 seconds. Minimum 5 seconds, maximum 100 seconds. If this is set above the maximum, it will be capped at 100 seconds.

public void setTimeout(Integer timeout)

Method Parameters

timeout

getDefaultTimeout()

public int getDefaultTimeout()

setDefaultTimeout( int defaultTimeout )

Set this to change the default timeout for all ChoiceSets. If a timeout is not set on an individual ChoiceSet object (or if it is set to 0), then it will use this timeout instead. See `timeout` for more details. If this is not set by you, it will default to 10 seconds. The minimum is 5 seconds, the maximum is 100 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.

public void setDefaultTimeout(int defaultTimeout)

Method Parameters

defaultTimeout

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)

Method 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)

Method 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)

Method 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
Previous Section Next Section