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
Slider

Class Slider

Hierarchy

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

Package
com.smartdevicelink.proxy.rpc

Overview

Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.

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

Function Group: Base

HMILevel needs to be FULL

Parameter List

Param Name Type Description Req. Notes Version Available
numTicks Integer Number of selectable items on a horizontal axis. Y Minvalue=2; Maxvalue=26 SmartDeviceLink 2.0
position Integer Initial position of slider control (cannot exceed numTicks), Y Minvalue=1; Maxvalue=26 SmartDeviceLink 2.0
sliderHeader String Text header to display N Maxlength=500 SmartDeviceLink 2.0
sliderFooter Integer

Text footer to display (meant to display min/max threshold descriptors).

For a static text footer, only one footer string shall be provided in the array. For a dynamic text footer, the number of footer text string in the array must match the numTicks value.For a dynamic text footer, text array string should correlate with potential slider position index.If omitted on supported displays, no footer text shall be displayed.
N Maxlength=500; Minvalue=1; Maxvalue=26 SmartDeviceLink 2.0
timeout String App defined timeout. Indicates how long of a timeout in milliseconds from the last action (i.e. sliding control resets timeout). If omitted, the value is set to 10000. N Minvalue=0; Maxvalue=65535; Defvalue= 10000 SmartDeviceLink 2.0
cancelID Integer An ID for this specific slider to allow cancellation through the `CancelInteraction` RPC. N SmartDeviceLink 6.0

Response

Non-default Result Codes:

SAVED

INVALID_DATA

OUT_OF_MEMORY

TOO_MANY_PENDING_REQUESTS

APPLICATION_NOT_REGISTERED

GENERIC_ERROR

DISALLOWED

UNSUPPORTED_RESOURCE

REJECTED

ABORTED

Fields

KEY_NUM_TICKS

public static final java.lang.String KEY_NUM_TICKS
Constant Value
"numTicks"

KEY_SLIDER_HEADER

public static final java.lang.String KEY_SLIDER_HEADER
Constant Value
"sliderHeader"
public static final java.lang.String KEY_SLIDER_FOOTER
Constant Value
"sliderFooter"

KEY_POSITION

public static final java.lang.String KEY_POSITION
Constant Value
"position"

KEY_TIMEOUT

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

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

Slider()

Constructs a new Slider object

public Slider()

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

Constructs a new Slider object indicated by the Hashtable parameter

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

Constructor Parameters

hash
The Hashtable to use

Slider( Integer numTicks, Integer position, String sliderHeader )

Constructs a new Slider object \

public Slider(Integer numTicks,Integer position,String sliderHeader)

Constructor Parameters

numTicks
Number of selectable items on a horizontal axis.
position
Initial position of slider control (cannot exceed numTicks)
sliderHeader
Text header to display

Methods

setNumTicks( Integer numTicks )

Sets a number of selectable items on a horizontal axis

public com.smartdevicelink.proxy.rpc.Slider setNumTicks(Integer numTicks)

Method Parameters

numTicks
an Integer value representing a number of selectable items on a horizontal axis

Notes: Minvalue=2; Maxvalue=26

getNumTicks()

Gets a number of selectable items on a horizontal axis

public java.lang.Integer getNumTicks()

setPosition( Integer position )

Sets an Initial position of slider control

public com.smartdevicelink.proxy.rpc.Slider setPosition(Integer position)

Method Parameters

position
an Integer value representing an Initial position of slider control

Notes: Minvalue=1; Maxvalue=26

getPosition()

Gets an Initial position of slider control

public java.lang.Integer getPosition()

setSliderHeader( String sliderHeader )

Sets a text header to display

public com.smartdevicelink.proxy.rpc.Slider setSliderHeader(String sliderHeader)

Method Parameters

sliderHeader
a String value

Notes: Maxlength=500

getSliderHeader()

Gets a text header to display

public java.lang.String getSliderHeader()

setSliderFooter( java.util.List<java.lang.String> sliderFooter )

Sets a text footer to display

public com.smartdevicelink.proxy.rpc.Slider setSliderFooter(java.util.List<java.lang.String> sliderFooter)

Method Parameters

sliderFooter
a List value representing a text footer to display

Notes: Maxlength=500; Minvalue=1; Maxvalue=26

getSliderFooter()

Gets a text footer to display

public java.util.List getSliderFooter()

setTimeout( Integer timeout )

Sets an App defined timeout in milliseconds

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

Method Parameters

timeout
an Integer value representing an App defined timeout in milliseconds

Notes: Minvalue=0; Maxvalue=65535; Defvalue=10000

getTimeout()

Gets an App defined timeout in milliseconds

public java.lang.Integer getTimeout()

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.Slider setCancelID(Integer cancelID)

Method Parameters

cancelID
An Integer ID for this specific slider 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