Code example for BluetoothServerSocket

Methods: close

0
                mmBtConnected.onConnectionEstablished(socket, true);
            } 
 
            public void cancel() { 
                try { 
                    mmServerSocket.close();
                } catch (IOException e) {
                } 
            } 
 
            public int getListeningPort() { 
                return mmListeningPort;
            } 
        } 
 
        private BluetoothServerSocket getBluetoothServerSocket() throws IOException {
            BluetoothServerSocket tmp;
 
            if (VERSION.SDK_INT < VERSION_CODES.GINGERBREAD_MR1) {
                tmp = mBluetoothAdapter.listenUsingRfcommWithServiceRecord(SERVICE_NAME,
                        mServiceUuid);