java.lang.Object
com.smartdevicelink.transport.MultiplexBaseTransport
protected static final java.lang.String SHARED_PREFS
Constructor. Prepares a new BluetoothChat session.
public MultiplexBluetoothTransport(Handler handler)
protected synchronized void setStateManually(int state)
Return the current connection state.
public synchronized int getState()
public void setKeepSocketAlive(boolean keepSocketAlive)
A method to retrieve the currently connected bluetooth device
public android.bluetooth.BluetoothDevice getConnectedDevice()
Start the chat service. Specifically start AcceptThread to begin a session in listening (server) mode. Called by the Activity onResume()
public synchronized void start()
Start the ConnectThread to initiate a connection to a remote device.
public synchronized void connect(BluetoothDevice device)
Start the ConnectedThread to begin managing a Bluetooth connection
public synchronized void connected(BluetoothSocket socket,BluetoothDevice device)
Stop all threads
public synchronized void stop()
protected synchronized void stop(int stateToTransitionTo)
protected synchronized void stop(int stateToTransitionTo,byte error)
Write to the ConnectedThread in an unsynchronized manner
public void write(byte[] out,int offset,int count)
public android.bluetooth.BluetoothSocket getBTSocket(BluetoothServerSocket bsSocket)
public int getChannel(BluetoothSocket bsSocket)
From Class | Methods |
---|---|
com.smartdevicelink.transport.MultiplexBaseTransport | setState, setState, getAddress, getDeviceName, getTransportRecord, getState, isConnected, stop, stop, stop, write |
java.lang.Object | getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |