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
TransportBroker

Class TransportBroker

Hierarchy

java.lang.Object

Package
com.smartdevicelink.transport
All Known Subclasses
com.smartdevicelink.transport.TransportManager.TransportBrokerImpl

Constructors

TransportBroker( Context context, String appId, ComponentName service )

Life Cycle **************************************************************

public TransportBroker(Context context,String appId,ComponentName service)

Constructor Parameters

context
appId
service

Methods

sendMessageToRouterService( Message message )

protected boolean sendMessageToRouterService(Message message)

Method Parameters

message

sendMessageToRouterService( Message message, int retryCount )

protected boolean sendMessageToRouterService(Message message,int retryCount)

Method Parameters

message
retryCount

start()

This beings the initial connection with the router service.

public boolean start()

resetSession()

public void resetSession()

stop()

This method will end our communication with the router service.

public void stop()

onServiceUnregsiteredFromRouterService( int unregisterCode )

Event Callbacks **************************************************************

public void onServiceUnregsiteredFromRouterService(int unregisterCode)

Method Parameters

unregisterCode

onHardwareDisconnected( TransportRecord record, java.util.List<com.smartdevicelink.transport.utl.TransportRecord> connectedTransports )

public void onHardwareDisconnected(TransportRecord record,java.util.List<com.smartdevicelink.transport.utl.TransportRecord> connectedTransports)

Method Parameters

record
connectedTransports

onHardwareConnected( java.util.List<com.smartdevicelink.transport.utl.TransportRecord> transports )

public boolean onHardwareConnected(java.util.List<com.smartdevicelink.transport.utl.TransportRecord> transports)

Method Parameters

transports

onPacketReceived( Parcelable packet )

public void onPacketReceived(Parcelable packet)

Method Parameters

packet

onLegacyModeEnabled()

public void onLegacyModeEnabled()

getRouterServiceVersion()

protected int getRouterServiceVersion()

sendPacketToRouterService( SdlPacket packet )

public boolean sendPacketToRouterService(SdlPacket packet)

Method Parameters

packet

getRouterService()

protected android.content.ComponentName getRouterService()

convertAppId( String appId )

public static java.lang.Long convertAppId(String appId)

Method Parameters

appId

enableLegacyMode( boolean enable )

protected void enableLegacyMode(boolean enable)

Method Parameters

enable

isLegacyModeEnabled()

protected static boolean isLegacyModeEnabled()

requestNewSession( TransportRecord transportRecord )

Use this method to let the router service know that you are requesting a new session from the head unit.

public void requestNewSession(TransportRecord transportRecord)

Method Parameters

transportRecord

requestSecondaryTransportConnection( byte sessionId, Bundle bundle )

Request secondary transport and communicate details to router service

public void requestSecondaryTransportConnection(byte sessionId,Bundle bundle)

Method Parameters

sessionId
bundle

removeSession( long sessionId )

public void removeSession(long sessionId)

Method Parameters

sessionId

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