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

Class SdlDeviceListener

Hierarchy

java.lang.Object

Package
com.smartdevicelink.transport.utl

Constructors

SdlDeviceListener( Context context, BluetoothDevice device, SdlDeviceListener.Callback callback )

public SdlDeviceListener(Context context,BluetoothDevice device,SdlDeviceListener.Callback callback)

Parameters

context
device
callback

Methods

start()

This will start the SDL Device Listener with two paths. The first path will be a check against the supplied bluetooth device to see if it has already successfully connected as an SDL device. If it has, the supplied callback will be called immediately. If the device hasn't connected as an SDL device before, the SDL Device Listener will then open up an RFCOMM channel using the SDL UUID and await a potential connection. A timeout is used to ensure this only listens for a finite amount of time. If this is the first time the device has been seen, this will listen for 30 seconds, if it is not, this will listen for 15 seconds instead.

public void start()

isRunning()

Check to see if this instance is in the middle of running or not

public boolean isRunning()

setSDLConnectedStatus( Context context, String address, boolean hasSDLConnected )

Set the connection establishment status of the particular device

public static void setSDLConnectedStatus(Context context,String address,boolean hasSDLConnected)

Parameters

context
address
address of the device in question
hasSDLConnected
true if a connection has been established, false if not

hasSDLConnected( Context context, String address )

Checks to see if a device address has connected to SDL before.

public static boolean hasSDLConnected(Context context,String address)

Parameters

context
address
the mac address of the device in question

isFeatureSupported( java.util.List<com.smartdevicelink.util.SdlAppInfo> sdlAppInfoList )

This method will check the current device and list of SDL enabled apps to derive if the feature can be supported. Due to older libraries sending their intents to start the router service right at the bluetooth A2DP/HFS connections, this feature can't be used until all applications are updated to the point they include the feature.

public static boolean isFeatureSupported(java.util.List<com.smartdevicelink.util.SdlAppInfo> sdlAppInfoList)

Parameters

sdlAppInfoList
current list of SDL enabled applications on the device

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