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
Android Documentation
PerformInteraction

Class PerformInteraction

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCRequest

Package
com.smartdevicelink.proxy.rpc

Overview

Performs an application-initiated interaction in which the user can select a Choice from among the specified Choice Sets. For instance, an application may use a PerformInteraction to ask a user to say the name of a song to play. The user's response is only valid if it appears in the specified Choice Sets and is recognized by SDL

If connecting to SDL Core v.6.0+, the perform interaction can be canceled programmatically using the `cancelID`. On older versions of SDL Core, the perform interaction will persist until the user has interacted with the perform interaction or the specified timeout has elapsed.

Function Group: Base

HMILevel needs to be FULL

Parameter List

Param Name Type Description Req. Notes Version Available
initialText String Displayed when the interaction begins. This text may be overlaid by the "Listening" prompt during the interaction. Text is displayed on first line of multiline display, and is centered. If text does not fit on line, it will be truncated Y maxlength:500 SmartDeviceLink 1.0
initialPrompt TTSChunk An array of one or more TTSChunks that, taken together, specify what is to be spoken to the user at the start of an interaction. Y minsize:1; maxsize:100 SmartDeviceLink 1.0
interactionMode InteractionMode Indicates how user selects interaction choice. User can choose either by voice (VR_ONLY), by visual selection from the menu (MANUAL_ONLY), or by either mode (BOTH). Y SmartDeviceLink 1.0
interactionChoiceSetIDList Integer Array of one or more Choice Set IDs. User can select any choice from any of the specified Choice Sets. Y minsize:0; maxsize:100; minvalue:0; maxvalue:2000000000 SmartDeviceLink 1.0
helpPrompt TTSChunk An array of TTSChunks which, taken together, specify the help phrase to be spoken when the user says "help" during the VR session. If this parameter is omitted, the help prompt will be constructed by SDL from the first vrCommand of each choice of all the Choice Sets specified in the interactionChoiceSetIDList parameter. N minsize:1; maxsize:100; The helpPrompt specified in SetGlobalProperties is not used by PerformInteraction. SmartDeviceLink 1.0
timeoutPrompt TTSChunk An array of TTSChunks which, taken together, specify the phrase to be spoken when the listen times out during the VR session. If this parameter is omitted, the timeout prompt will be the same as the help prompt (see helpPrompt parameter). N The timeoutPrompt specified in SetGlobalProperties is not used by PerformInteraction. minsize:1;maxsize:100 SmartDeviceLink 1.0
timeout Integer The amount of time, in milliseconds, SDL will wait for the user to make a choice (VR or Menu). If this time elapses without the user making a choice, the timeoutPrompt will be spoken. After this timeout value has been reached, the interaction will stop and a subsequent interaction will take place after SDL speaks the timeout prompt. If that times out as well, the interaction will end completely. If omitted, the default is 10000ms. N minvalue:5000; maxvalue:100000; defvalue:10000 SmartDeviceLink 1.0
vrHelp VrHelpItem Ability to send suggested VR Help Items to display on-screen during Perform Interaction If omitted on supported displays, the default SDL generated list of suggested choices will be displayed. N Min = 1;Max = 100 SmartDeviceLink 2.0
interactionLayout LayoutMode See LayoutMode N SmartDeviceLink 3.0
cancelID Integer An ID for this specific perform interaction to allow cancellation through the `CancelInteraction` RPC. N SmartDeviceLink 6.0

Fields

KEY_INITIAL_TEXT

public static final java.lang.String KEY_INITIAL_TEXT
Constant Value
"initialText"

KEY_INTERACTION_MODE

public static final java.lang.String KEY_INTERACTION_MODE
Constant Value
"interactionMode"

KEY_INTERACTION_CHOICE_SET_ID_LIST

public static final java.lang.String KEY_INTERACTION_CHOICE_SET_ID_LIST
Constant Value
"interactionChoiceSetIDList"

KEY_INTERACTION_LAYOUT

public static final java.lang.String KEY_INTERACTION_LAYOUT
Constant Value
"interactionLayout"

KEY_INITIAL_PROMPT

public static final java.lang.String KEY_INITIAL_PROMPT
Constant Value
"initialPrompt"

KEY_HELP_PROMPT

public static final java.lang.String KEY_HELP_PROMPT
Constant Value
"helpPrompt"

KEY_TIMEOUT_PROMPT

public static final java.lang.String KEY_TIMEOUT_PROMPT
Constant Value
"timeoutPrompt"

KEY_TIMEOUT

public static final java.lang.String KEY_TIMEOUT
Constant Value
"timeout"

KEY_VR_HELP

public static final java.lang.String KEY_VR_HELP
Constant Value
"vrHelp"

KEY_CANCEL_ID

public static final java.lang.String KEY_CANCEL_ID
Constant Value
"cancelID"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCRequest onResponseListener
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

PerformInteraction()

Constructs a new PerformInteraction object

public PerformInteraction()

PerformInteraction( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a new PerformInteraction object indicated by the Hashtable parameter

public PerformInteraction(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Constructor Parameters

hash
The Hashtable to use

PerformInteraction( String initialText, InteractionMode interactionMode, java.util.List<java.lang.Integer> interactionChoiceSetIDList )

Constructs a new PerformInteraction object

public PerformInteraction(String initialText,InteractionMode interactionMode,java.util.List<java.lang.Integer> interactionChoiceSetIDList)

Constructor Parameters

initialText
a String value that is displayed when the interaction begins
interactionMode
indicate how user selects interaction choice (VR_ONLY, MANUAL_ONLY or BOTH)
interactionChoiceSetIDList
a List representing an Array of one or more Choice Set IDs. User can select any choice from any of the specified Choice Sets Notes: Min Value: 0; Max Value: 2000000000

Methods

getInitialText()

Gets the Text that Displayed when the interaction begins. This text may be overlaid by the "Listening" prompt during the interaction. Text is displayed on first line of multiline display, and is centered. If text does not fit on line, it will be truncated

public java.lang.String getInitialText()

setInitialText( String initialText )

Sets the Text that Displayed when the interaction begins. This text may be overlaid by the "Listening" prompt during the interaction. Text is displayed on first line of multiline display, and is centered. If text does not fit on line, it will be truncated

public com.smartdevicelink.proxy.rpc.PerformInteraction setInitialText(String initialText)

Method Parameters

initialText
a String value that Displayed when the interaction begins

getInitialPrompt()

Gets an An array of one or more TTSChunks that, taken together, specify what is to be 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 )

Sets An array of one or more TTSChunks that, taken together, specify what is to be spoken to the user at the start of an interaction

public com.smartdevicelink.proxy.rpc.PerformInteraction setInitialPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt)

Method Parameters

initialPrompt
a List value, specify what is to be spoken to the user at the start of an interaction

getInteractionMode()

Gets the Indicates mode that indicate how user selects interaction choice. User can choose either by voice (VR_ONLY), by visual selection from the menu (MANUAL_ONLY), or by either mode (BOTH)

public com.smartdevicelink.proxy.rpc.enums.InteractionMode getInteractionMode()

setInteractionMode( InteractionMode interactionMode )

Sets the Indicates mode that indicate how user selects interaction choice. User can choose either by voice (VR_ONLY), by visual selection from the menu (MANUAL_ONLY), or by either mode (BOTH)

public com.smartdevicelink.proxy.rpc.PerformInteraction setInteractionMode(InteractionMode interactionMode)

Method Parameters

interactionMode
indicate how user selects interaction choice (VR_ONLY, MANUAL_ONLY or BOTH)

getInteractionChoiceSetIDList()

Gets a List value representing an Array of one or more Choice Set IDs

public java.util.List getInteractionChoiceSetIDList()

setInteractionChoiceSetIDList( java.util.List<java.lang.Integer> interactionChoiceSetIDList )

Sets a List representing an Array of one or more Choice Set IDs. User can select any choice from any of the specified Choice Sets

public com.smartdevicelink.proxy.rpc.PerformInteraction setInteractionChoiceSetIDList(java.util.List<java.lang.Integer> interactionChoiceSetIDList)

Method Parameters

interactionChoiceSetIDList
-a List representing an Array of one or more Choice Set IDs. User can select any choice from any of the specified Choice Sets

Notes: Min Value: 0; Max Vlaue: 2000000000

getHelpPrompt()

Gets a List which taken together, specify the help phrase to be spoken when the user says "help" during the VR session

public java.util.List getHelpPrompt()

setHelpPrompt( java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt )

Sets An array of TTSChunks which, taken together, specify the help phrase to be spoken when the user says "help" during the VR session

If this parameter is omitted, the help prompt will be constructed by SDL from the first vrCommand of each choice of all the Choice Sets specified in the interactionChoiceSetIDList parameter

Notes: The helpPrompt specified in SetGlobalProperties is not used by PerformInteraction

public com.smartdevicelink.proxy.rpc.PerformInteraction setHelpPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> helpPrompt)

Method Parameters

helpPrompt
a List which taken together, specify the help phrase to be spoken when the user says "help" during the VR session

getTimeoutPrompt()

Gets An array of TTSChunks which, taken together, specify the phrase to be spoken when the listen times out during the VR session

public java.util.List getTimeoutPrompt()

setTimeoutPrompt( java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt )

Sets An array of TTSChunks which, taken together, specify the phrase to be spoken when the listen times out during the VR session

Notes: The timeoutPrompt specified in SetGlobalProperties is not used by PerformInteraction

public com.smartdevicelink.proxy.rpc.PerformInteraction setTimeoutPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> timeoutPrompt)

Method Parameters

timeoutPrompt
a List specify the phrase to be spoken when the listen times out during the VR session

getTimeout()

Gets a Integer value representing the amount of time, in milliseconds, SDL will wait for the user to make a choice (VR or Menu)

public java.lang.Integer getTimeout()

setTimeout( Integer timeout )

Sets the amount of time, in milliseconds, SDL will wait for the user to make a choice (VR or Menu). If this time elapses without the user making a choice, the timeoutPrompt will be spoken. After this timeout value has been reached, the interaction will stop and a subsequent interaction will take place after SDL speaks the timeout prompt. If that times out as well, the interaction will end completely. If omitted, the default is 10000ms

public com.smartdevicelink.proxy.rpc.PerformInteraction setTimeout(Integer timeout)

Method Parameters

timeout
an Integer value representing the amount of time, in milliseconds, SDL will wait for the user to make a choice (VR or Menu)

Notes: Min Value: 5000; Max Value: 100000

getVrHelp()

Gets a Voice Recognition Help list, which is a list of suggested VR Help Items to display on-screen during a Perform Interaction

public java.util.List getVrHelp()

setVrHelp( java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> vrHelp )

Sets a Voice Recognition Help list, which is a list of suggested VR Help Items to display on-screen during a Perform Interaction

public com.smartdevicelink.proxy.rpc.PerformInteraction setVrHelp(java.util.List<com.smartdevicelink.proxy.rpc.VrHelpItem> vrHelp)

Method Parameters

vrHelp
a List representing a suggested VR Help Items to display on-screen during Perform Interaction If omitted on supported displays, the default SDL generated list of suggested choices will be displayed

Notes: Min=1; Max=100

getInteractionLayout()

Gets the layout mode of how the choices are presented. For touchscreen interactions only.

public com.smartdevicelink.proxy.rpc.enums.LayoutMode getInteractionLayout()

setInteractionLayout( LayoutMode interactionLayout )

Sets the mode of how the choices are presented. For touchscreen interactions only.

public com.smartdevicelink.proxy.rpc.PerformInteraction setInteractionLayout(LayoutMode interactionLayout)

Method Parameters

interactionLayout
A LayoutMode representing the interaction layout mode

getCancelID()

Gets an Integer value representing the cancel ID

public java.lang.Integer getCancelID()

setCancelID( Integer cancelID )

Sets the cancel ID

public com.smartdevicelink.proxy.rpc.PerformInteraction setCancelID(Integer cancelID)

Method Parameters

cancelID
An Integer ID for this specific perform interaction to allow cancellation through the `CancelInteraction` RPC.

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCRequest getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener
com.smartdevicelink.proxy.RPCMessage getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong, clone, equals, hashCode
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section