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
Slider

Slider

Type
Function
Sender
SDL
Purpose
Display a user controlled slider UI element.

Request

Parameters

Name Type Mandatory Additional
numTicks Integer true minvalue: 2
maxvalue: 26
position Integer true minvalue: 1
maxvalue: 26
sliderHeader String true maxlength: 500
sliderFooter String false array: true
minsize: 1
maxsize: 26
maxlength: 500
timeout Integer true minvalue: 1000
maxvalue: 65535
appID Integer true
cancelID Integer false

Response

In case HMI needs more time to get input from user for processing UI.Slider request, HMI must send BC.OnResetTimeout notification to SDL to reset the timeout.

Parameters

Name Type Mandatory Additional
sliderPosition Integer false minvalue: 1
maxvalue: 26

Sequence Diagrams

JSON Message Examples

Example Request

{
  "id" : 133,
  "jsonrpc" : "2.0",
  "method" : "UI.Slider",
  "params" :
  {
    "numTicks" : 5,
    "position" : 2,
    "sliderHeader" : "Volume Level",
    "sliderFooter" : [ "1/5", "2/5", "3/5", "4/5", "5/5" ],
    "timeout" : 10000,
    "appID" : 4328
  }
}

Example Response

{
  "id" : 133,
  "jsonrpc" : "2.0",
  "result" :
  {
    "sliderPosition" : 4,
    "code" : 0,
    "method" : "UI.Slider"
  }
}

Example Response (Timeout)

{
  "id" : 133,
  "jsonrpc" : "2.0",
  "result" :
  {
    "sliderPosition" : 5,
    "code" : 10,
    "method" : "UI.Slider"
  }
}

Example Error

{
  "id" : 133,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 13,
    "message" : "One of the provided IDs is not valid",
    "data" :
    {
      "method" : "UI.Slider"
    }
  }
}
View on GitHub.com
Previous Section Next Section