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

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 Error

{
  "id" : 133,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 5,
    "message" : "A command was aborted due to user interaction",
    "data" :
    {
      "sliderPosition" : 5,
      "method" : "UI.Slider"
    }
  }
}
{
  "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