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

Class SdlManager

Hierarchy

java.lang.Object
     com.smartdevicelink.managers.BaseSdlManager

Package
com.smartdevicelink.managers

Overview

SDLManager
This is the main point of contact between an application and SDL
It is broken down to these areas:
1. SDLManagerBuilder
2. ISdl Interface along with its overridden methods - This can be passed into attached managers
3. Sending Requests
4. Helper methods

Constructors

SdlManager()

public SdlManager()

Methods

checkLifecycleConfiguration()

protected void checkLifecycleConfiguration()

initialize()

protected void initialize()

dispose()

public void dispose()

getPermissionManager()

Gets the PermissionManager.
Note: PermissionManager should be used only after SdlManager.start() CompletionListener callback is completed successfully.

public com.smartdevicelink.managers.permission.PermissionManager getPermissionManager()

getFileManager()

Gets the FileManager.
Note: FileManager should be used only after SdlManager.start() CompletionListener callback is completed successfully.

public com.smartdevicelink.managers.file.FileManager getFileManager()

getScreenManager()

Gets the ScreenManager.
Note: ScreenManager should be used only after SdlManager.start() CompletionListener callback is completed successfully.

public com.smartdevicelink.managers.screen.ScreenManager getScreenManager()

getSystemCapabilityManager()

Gets the SystemCapabilityManager.
Note: SystemCapabilityManager should be used only after SdlManager.start() CompletionListener callback is completed successfully.

public com.smartdevicelink.proxy.SystemCapabilityManager getSystemCapabilityManager()

getRegisterAppInterfaceResponse()

Method to retrieve the RegisterAppInterface Response message that was sent back from the module. It contains various attributes about the connected module and can be used to adapt to different module types and their supported features.

public com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse getRegisterAppInterfaceResponse()

getCurrentHMIStatus()

Get the current OnHMIStatus

public com.smartdevicelink.proxy.rpc.OnHMIStatus getCurrentHMIStatus()

getAuthToken()

Retrieves the auth token, if any, that was attached to the StartServiceACK for the RPC service from the module. For example, this should be used to login to a user account.

public java.lang.String getAuthToken()

sendRPC( RPCMessage message )

Send RPC Message

public void sendRPC(RPCMessage message)

Parameters

message
RPCMessage

sendSequentialRPCs( java.util.List<? extends com.smartdevicelink.proxy.RPCMessage> rpcs, OnMultipleRequestListener listener )

Takes a list of RPCMessages and sends it to SDL in a synchronous fashion. Responses are captured through callback on OnMultipleRequestListener. For sending requests asynchronously, use sendRequests
NOTE: This will override any listeners on individual RPCs
ADDITIONAL NOTE: This only takes the type of RPCRequest for now, notifications and responses will be thrown out

public void sendSequentialRPCs(java.util.List<? extends com.smartdevicelink.proxy.RPCMessage> rpcs,OnMultipleRequestListener listener)

Parameters

rpcs
is the list of RPCMessages being sent
listener
listener for updates and completions

sendRPCs( java.util.List<? extends com.smartdevicelink.proxy.RPCMessage> rpcs, OnMultipleRequestListener listener )

Takes a list of RPCMessages and sends it to SDL. Responses are captured through callback on OnMultipleRequestListener. For sending requests synchronously, use sendSequentialRPCs
NOTE: This will override any listeners on individual RPCs
ADDITIONAL NOTE: This only takes the type of RPCRequest for now, notifications and responses will be thrown out

public void sendRPCs(java.util.List<? extends com.smartdevicelink.proxy.RPCMessage> rpcs,OnMultipleRequestListener listener)

Parameters

rpcs
is the list of RPCMessages being sent
listener
listener for updates and completions

addOnRPCNotificationListener( FunctionID notificationId, OnRPCNotificationListener listener )

Add an OnRPCNotificationListener

public void addOnRPCNotificationListener(FunctionID notificationId,OnRPCNotificationListener listener)

Parameters

notificationId
listener
listener that will be called when a notification is received

removeOnRPCNotificationListener( FunctionID notificationId, OnRPCNotificationListener listener )

Remove an OnRPCNotificationListener

public void removeOnRPCNotificationListener(FunctionID notificationId,OnRPCNotificationListener listener)

Parameters

notificationId
listener
listener that was previously added

addOnRPCRequestListener( FunctionID requestId, OnRPCRequestListener listener )

Add an OnRPCRequestListener

public void addOnRPCRequestListener(FunctionID requestId,OnRPCRequestListener listener)

Parameters

requestId
listener
listener that will be called when a request is received

removeOnRPCRequestListener( FunctionID requestId, OnRPCRequestListener listener )

Remove an OnRPCRequestListener

public void removeOnRPCRequestListener(FunctionID requestId,OnRPCRequestListener listener)

Parameters

requestId
listener
listener that was previously added

start()

Starts up a SdlManager, and calls provided callback called once all BaseSubManagers are done setting up

public void start()

startRPCEncryption()

Start a secured RPC service

public void startRPCEncryption()

Inherited Methods

From Class Methods
com.smartdevicelink.managers.BaseSdlManager getAppName, getAppId, getShortAppName, getMinimumProtocolVersion, getMinimumRPCVersion, getHmiLanguage, getDayColorScheme, getNightColorScheme, getAppTypes, getVrSynonyms, getTtsChunks, getTransport, getState, transitionToState, initialize, checkLifecycleConfiguration, start, dispose, sendRPC, sendSequentialRPCs, sendRPCs, getRegisterAppInterfaceResponse, getCurrentHMIStatus, getAuthToken, addOnRPCNotificationListener, removeOnRPCNotificationListener, addOnRPCRequestListener, removeOnRPCRequestListener
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section