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
SdlManagerListener

SdlManagerListener Class Reference

Constructors

Instance Methods

Constructors

new SdlManagerListener()

Initializes an instance of SdlManagerListener

Instance Methods

sdlManagerListener.managerShouldUpdateLifecycle(language) ⇒ [LifecycleConfigurationUpdate, null]

Safely attempts to invoke the ManagerShouldUpdateLifecycle event callback function.

Kind: Instance method of SdlManagerListener
Returns: [LifecycleConfigurationUpdate, null] - A reference to LifecycleConfigurationUpdate instance or null

ParamTypeDescription
language Language A Language enum value.

sdlManagerListener.managerShouldUpdateLifecycleToLanguage(language, hmiLanguage) ⇒ [LifecycleConfigurationUpdate, null]

Called when the SDL manager detected a language mismatch. In case of a language mismatch the manager should change the apps registration by updating the lifecycle configuration to the specified language. If the app can support the specified language it should return an Object of LifecycleConfigurationUpdate, otherwise it should return null to indicate that the language is not supported.

Kind: Instance method of SdlManagerListener
Returns: [LifecycleConfigurationUpdate, null] - A reference to LifecycleConfigurationUpdate instance or null

ParamTypeDescription
language Language The VR+TTS language of the connected head unit the manager is trying to update the configuration.
hmiLanguage Language The HMI display language of the connected head unit the manager is trying to update the configuration.

sdlManagerListener.onDestroy(sdlManager)

Safely attempts to invoke the OnDestroy event callback function.

Kind: Instance method of SdlManagerListener

ParamTypeDescription
sdlManager SdlManager A reference to an SdlManager instance.

sdlManagerListener.onError(sdlManager, info)

Safely attempts to invoke the OnError event callback function.

Kind: Instance method of SdlManagerListener

ParamTypeDescription
sdlManager SdlManager A reference to an SdlManager instance.
info String Information about the error

sdlManagerListener.onStart(sdlManager)

Safely attempts to invoke the OnStart event callback function.

Kind: Instance method of SdlManagerListener

ParamTypeDescription
sdlManager SdlManager A reference to an SdlManager instance.

sdlManagerListener.onSystemInfoReceived(systemInfo) ⇒ Boolean

Safely attempts to invoke the onSystemInfoReceived event.

Kind: Instance method of SdlManagerListener
Returns: Boolean Return true if this session should continue, false if the session should end

ParamTypeDescription
systemInfo SystemInfo the system info of vehicle that this session is currently active on.

sdlManagerListener.setManagerShouldUpdateLifecycle(callback) ⇒ SdlManagerListener

Set the ManagerShouldUpdateLifecycle event callback function.

Kind: Instance method of SdlManagerListener
Returns: SdlManagerListener - A reference to this instance to support method chaining.

ParamTypeDescription
callback function A function to invoke when the event is triggered.

sdlManagerListener.setManagerShouldUpdateLifecycleToLanguage(callback) ⇒ SdlManagerListener

Set the ManagerShouldUpdateLifecycleToLanguage event callback function.

Kind: Instance method of SdlManagerListener
Returns: SdlManagerListener - A reference to this instance to support method chaining.

ParamTypeDescription
callback function A function to invoke when the event is triggered.

sdlManagerListener.setOnDestroy(callback) ⇒ SdlManagerListener

Set the OnDestroy event callback function.

Kind: Instance method of SdlManagerListener
Returns: SdlManagerListener - A reference to this instance to support method chaining.

ParamTypeDescription
callback function A function to invoke when the event is triggered.

sdlManagerListener.setOnError(callback) ⇒ SdlManagerListener

Set the OnError event callback function.

Kind: Instance method of SdlManagerListener
Returns: SdlManagerListener - A reference to this instance to support method chaining.

ParamTypeDescription
callback function A function to invoke when the event is triggered.

sdlManagerListener.setOnStart(callback) ⇒ SdlManagerListener

Set the OnStart event callback function.

Kind: Instance method of SdlManagerListener
Returns: SdlManagerListener - A reference to this instance to support method chaining.

ParamTypeDescription
callback function A function to invoke when the event is triggered.

sdlManagerListener.setOnSystemInfoReceived(listener) ⇒ SdlManagerListener

Set the onSystemInfoReceived function.

Kind: Instance method of SdlManagerListener
Returns: SdlManagerListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.
View on GitHub.com
Previous Section Next Section