Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class SdlManager.Builder

Hierarchy

java.lang.Object

Package
com.smartdevicelink.managers

Constructors

Builder( Context context, String appId, String appName, SdlManagerListener listener )

Builder for the SdlManager. Parameters in the constructor are required.

public Builder(Context context,String appId,String appName,SdlManagerListener listener)

Parameters

context
the current context
appId
the app's ID
appName
the app's name
listener
a SdlManagerListener object

Builder( Context context, String appId, String appName, BaseTransportConfig transport, SdlManagerListener listener )

Builder for the SdlManager. Parameters in the constructor are required.

public Builder(Context context,String appId,String appName,BaseTransportConfig transport,SdlManagerListener listener)

Parameters

context
the current context
appId
the app's ID
appName
the app's name
transport
listener
a SdlManagerListener object

Methods

setAppId( String appId )

Sets the App ID

public com.smartdevicelink.managers.SdlManager.Builder setAppId(String appId)

Parameters

appId

setAppName( String appName )

Sets the Application Name

public com.smartdevicelink.managers.SdlManager.Builder setAppName(String appName)

Parameters

appName

setShortAppName( String shortAppName )

Sets the Short Application Name

public com.smartdevicelink.managers.SdlManager.Builder setShortAppName(String shortAppName)

Parameters

shortAppName

setMinimumProtocolVersion( Version minimumProtocolVersion )

Sets the minimum protocol version that will be permitted to connect. If the protocol version of the head unit connected is below this version, the app will disconnect with an EndService protocol message and will not register.

public com.smartdevicelink.managers.SdlManager.Builder setMinimumProtocolVersion(Version minimumProtocolVersion)

Parameters

minimumProtocolVersion
the minimum Protocol spec version that should be accepted

setMinimumRPCVersion( Version minimumRPCVersion )

The minimum RPC version that will be permitted to connect. If the RPC version of the head unit connected is below this version, an UnregisterAppInterface will be sent.

public com.smartdevicelink.managers.SdlManager.Builder setMinimumRPCVersion(Version minimumRPCVersion)

Parameters

minimumRPCVersion
the minimum RPC spec version that should be accepted

setLanguage( Language hmiLanguage )

Sets the Language of the App

public com.smartdevicelink.managers.SdlManager.Builder setLanguage(Language hmiLanguage)

Parameters

hmiLanguage
the desired language to be used on the display/HMI of the connected module

setDayColorScheme( TemplateColorScheme dayColorScheme )

Sets the TemplateColorScheme for daytime

public com.smartdevicelink.managers.SdlManager.Builder setDayColorScheme(TemplateColorScheme dayColorScheme)

Parameters

dayColorScheme
color scheme that will be used (if supported) when the display is in a "Day Mode" or similar. Should comprise of colors that contrast well during the day under sunlight.

setNightColorScheme( TemplateColorScheme nightColorScheme )

Sets the TemplateColorScheme for nighttime

public com.smartdevicelink.managers.SdlManager.Builder setNightColorScheme(TemplateColorScheme nightColorScheme)

Parameters

nightColorScheme
color scheme that will be used (if supported) when the display is in a "Night Mode" or similar. Should comprise of colors that contrast well during the night and are not brighter than average.

setLockScreenConfig( LockScreenConfig lockScreenConfig )

Sets the LockScreenConfig for the session.
Note: If not set, the default configuration will be used.

public com.smartdevicelink.managers.SdlManager.Builder setLockScreenConfig(LockScreenConfig lockScreenConfig)

Parameters

lockScreenConfig
- configuration options

setAppIcon( SdlArtwork sdlArtwork )

Sets the icon for the app on head unit / In-Vehicle-Infotainment system

public com.smartdevicelink.managers.SdlManager.Builder setAppIcon(SdlArtwork sdlArtwork)

Parameters

sdlArtwork
the icon that will be used to represent this application on the connected module

setAppTypes( java.util.Vector<com.smartdevicelink.proxy.rpc.enums.AppHMIType> hmiTypes )

Sets the vector of AppHMIType
Note: This should be an ordered list from most -> least relevant

public com.smartdevicelink.managers.SdlManager.Builder setAppTypes(java.util.Vector<com.smartdevicelink.proxy.rpc.enums.AppHMIType> hmiTypes)

Parameters

hmiTypes
HMI types that represent this application. For example, if the app is a music player, the MEDIA HMIType should be included.

setVrSynonyms( java.util.Vector<java.lang.String> vrSynonyms )

Sets the voice recognition synonyms that can be used to identify this application.

public com.smartdevicelink.managers.SdlManager.Builder setVrSynonyms(java.util.Vector<java.lang.String> vrSynonyms)

Parameters

vrSynonyms
a vector of Strings that can be associated with this app. For example the app's name should be included as well as any phonetic spellings of the app name that might help the on-board VR system associated a users spoken word with the supplied synonyms.

setTtsName( java.util.Vector<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks )

Sets the Text-To-Speech Name of the application. These TTSChunks might be used by the module as an audio representation of the app's name.

public com.smartdevicelink.managers.SdlManager.Builder setTtsName(java.util.Vector<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks)

Parameters

ttsChunks
the TTS chunks that can represent this app's name

setTransportType( BaseTransportConfig transport )

This Object type may change with the transport refactor Sets the BaseTransportConfig

public com.smartdevicelink.managers.SdlManager.Builder setTransportType(BaseTransportConfig transport)

Parameters

transport
the type of transport that should be used for this SdlManager instance.

setContext( Context context )

Sets the Context

public com.smartdevicelink.managers.SdlManager.Builder setContext(Context context)

Parameters

context

setSdlSecurity( java.util.List<java.lang.Class<? extends com.smartdevicelink.security.SdlSecurityBase>> secList )

Deprecated
Sets the Security library

public com.smartdevicelink.managers.SdlManager.Builder setSdlSecurity(java.util.List<java.lang.Class<? extends com.smartdevicelink.security.SdlSecurityBase>> secList)

Parameters

secList
The list of security class(es)

setSdlSecurity( java.util.List<java.lang.Class<? extends com.smartdevicelink.security.SdlSecurityBase>> secList, ServiceEncryptionListener listener )

Sets the security libraries and a callback to notify caller when there is update to encryption service

public com.smartdevicelink.managers.SdlManager.Builder setSdlSecurity(java.util.List<java.lang.Class<? extends com.smartdevicelink.security.SdlSecurityBase>> secList,ServiceEncryptionListener listener)

Parameters

secList
The list of security class(es)
listener
The callback object

setManagerListener( SdlManagerListener listener )

Set the SdlManager Listener

public com.smartdevicelink.managers.SdlManager.Builder setManagerListener(SdlManagerListener listener)

Parameters

listener
the listener

setRPCNotificationListeners( java.util.Map<com.smartdevicelink.protocol.enums.FunctionID, com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener> listeners )

Set RPCNotification listeners. SdlManager will preload these listeners before any RPCs are sent/received.

public com.smartdevicelink.managers.SdlManager.Builder setRPCNotificationListeners(java.util.Map<com.smartdevicelink.protocol.enums.FunctionID, com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener> listeners)

Parameters

listeners
a map of listeners that will be called when a notification is received. Key represents the FunctionID of the notification and value represents the listener

build()

Build SdlManager ang get it ready to be started Note: new instance of SdlManager should be created on every connection. SdlManager cannot be reused after getting disposed.

public com.smartdevicelink.managers.SdlManager build()

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section