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

PerformInteraction

Type
Function
Sender
SDL
Purpose
Perform a VR interaction with the User.

Request

Parameters

Name Type Mandatory Additional
helpPrompt Common.TTSChunk false array: true
minsize: 1
maxsize: 100
initialPrompt Common.TTSChunk false array: true
minsize: 1
maxsize: 100
timeoutPrompt Common.TTSChunk false array: true
minsize: 1
maxsize: 100
timeout Integer true
grammarID Integer false array: true
minsize: 1
maxsize: 100
minvalue: 0
maxvalue: 2000000000
appID Integer true
cancelID Integer false

Response

Parameters

Name Type Mandatory Additional
choiceID Integer false minvalue: 0
maxvalue: 2000000000

Sequence Diagrams

JSON Message Examples

Example Request

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "method" : "VR.PerformInteraction",
  "params" :
  {
    "initialPrompt" :
    [
      {
        "text" : "Please make your choice by voice", 
        "type" : "TEXT"
      }
    ],

    "helpPrompt" :
    [
      {
        "text" : "Yes", 
        "type" : "TEXT"
      },
      {
        "text" : "No", 
        "type" : "TEXT"
      },
      {
        "text" : "Skip", 
        "type" : "TEXT"
      }
    ],

    "timeoutPrompt" :
    [
      {
        "text" : "The time is about to run out", 
        "type" : "TEXT"
      }
    ],

    "timeout" : 10000,
    "grammarID" : 245,
    "appID" : 101
  }
}

Example Response

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "result" :
  {
    "choiceID" : 2416,
    "code" : 0,
    "method" : "VR.PerformInteraction"
  }
}

Example Error

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 10,
    "message" : "Interaction reached the maximum timeout and will be closed",
    "data" :
    {
      "method" : "VR.PerformInteraction"
    }
  }
}
View on GitHub.com
Previous Section Next Section