Code example for BluetoothSocket

Methods: close

            connected(mmSocket, mmDevice);
        public void cancel() { 
            try { 
            } catch (IOException e) {
                Log.e(TAG, "close() of connect socket failed", e);
     * This thread runs during a connection with a remote device. 
     * It handles all incoming and outgoing transmissions. 
    private class ConnectedThread extends Thread {
        private final BluetoothSocket mmSocket;
        private final InputStream mmInStream;
        private final OutputStream mmOutStream;