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

PerformInteraction

Type
Function
Sender
SDL
Purpose
Perform a UI Interaction with the User.

A request sent by SDL to display a list of choices to the user.

Must
  1. Display the choices in choiceSet to the user reasonably according to the interactionLayout.
  2. Wait until the user responds or send BC.OnResetTimeout notification to SDL to reset the timeout in case HMI needs more time to get input from user.
  3. Include the choiceID of the chosen option (or manualTextEntry when using KEYBOARD layout) in the response to SDL.
  4. If the interaction times out, respond with a success and no choiceID parameter to SDL.
Note

A UI.PerformInteraction with a timeout value of zero should not be timed out immediately. Instead, it should use some default timeout value predetermined by the HMI.

Request

Parameters

Name Type Mandatory Additional
initialText Common.TextFieldStruct false
choiceSet Common.Choice false array: true
minsize: 1
maxsize: 100
vrHelpTitle String false maxlength: 500
vrHelp Common.VrHelpItem false array: true
minsize: 1
maxsize: 100
timeout Integer true minvalue: 5000
maxvalue: 100000
defvalue: 10000
interactionLayout Common.LayoutMode false
appID Integer true
cancelID Integer false

Response

Parameters

Name Type Mandatory Additional
choiceID Integer false minvalue: 0
maxvalue: 2000000000
manualTextEntry String false minlength: 0
maxlength: 500

Sequence Diagrams

JSON Message Examples

Example Request

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "method" : "UI.PerformInteraction",
  "params" :
  {
    "initialText" :
    {
         "fieldName" : "initialInteractionText",
         "fieldText" : "Choose the station:"
    },

    "choiceSet" :
    [
      {
         "choiceID" : 2415,
         "menuName" : "Sky.FM"
      },

      {
         "choiceID" : 2416,
         "menuName" : "Paradise"
      },

      {
         "choiceID" : 2417,
         "menuName" : "100 XR"
      }
    ],

    "vrHelp" :
    [
        {
         "text" : "Sky FM",
         "image" :
          {
             "value" : "tmp/SDL/app/Pandora/icon_5410.jpg",
             "imageType" : "DYNAMIC"
          },

         "position" : 1
        },

        {
         "text" : "Paradise",
         "image" :
          {
             "value" : "tmp/SDL/app/Pandora/icon_5423.jpeg",
             "imageType" : "DYNAMIC"
          },
         "position" : 2
        },

        {
         "text" : "100 XR",
         "image" :
          {
             "value" : "tmp/SDL/app/Pandora/icon_5465.jpeg",
             "imageType" : "DYNAMIC"
          },
         "position" : 3
        }
    ],

    "timeout" : 15000,
    "appID" : 6493
  }
}

Example Response

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

Example Error

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