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
JavaScript Suite Documentation
OnDriverDistraction

OnDriverDistraction Class Reference

Constructors

Instance Methods

Constructors

new OnDriverDistraction(parameters)

Initializes an instance of OnDriverDistraction.

Instance Methods

onDriverDistraction.getLockScreenDismissalEnabled() ⇒ Boolean

Get the LockScreenDismissalEnabled

Kind: Instance method of OnDriverDistraction
Returns: Boolean - the KEY_LOCK_SCREEN_DISMISSAL_ENABLED value

onDriverDistraction.getLockScreenDismissalWarning() ⇒ String

Get the LockScreenDismissalWarning

Kind: Instance method of OnDriverDistraction
Returns: String - the KEY_LOCK_SCREEN_DISMISSAL_WARNING value

onDriverDistraction.getState() ⇒ DriverDistractionState

Get the State

Kind: Instance method of OnDriverDistraction
Returns: DriverDistractionState - the KEY_STATE value

onDriverDistraction.setLockScreenDismissalEnabled(enabled) ⇒ OnDriverDistraction

Set the LockScreenDismissalEnabled

Kind: Instance method of OnDriverDistraction
Returns: OnDriverDistraction - The class instance for method chaining.

ParamTypeDescription
enabled Boolean If enabled, the lock screen will be able to be dismissed while connected to SDL, allowing users the ability to interact with the app. Dismissals should include a warning to the user and ensure that they are not the driver. - The desired LockScreenDismissalEnabled.

onDriverDistraction.setLockScreenDismissalWarning(warning) ⇒ OnDriverDistraction

Set the LockScreenDismissalWarning

Kind: Instance method of OnDriverDistraction
Returns: OnDriverDistraction - The class instance for method chaining.

ParamTypeDescription
warning String Warning message to be displayed on the lock screen when dismissal is enabled. This warning should be used to ensure that the user is not the driver of the vehicle, ex. `Swipe down to dismiss, acknowledging that you are not the driver.`. This parameter must be present if "lockScreenDismissalEnabled" is set to true. - The desired LockScreenDismissalWarning. {'string_min_length': 1}

onDriverDistraction.setState(state) ⇒ OnDriverDistraction

Set the State

Kind: Instance method of OnDriverDistraction
Returns: OnDriverDistraction - The class instance for method chaining.

ParamTypeDescription
state DriverDistractionState Current State of Driver Distraction - The desired State.
View on GitHub.com
Previous Section Next Section