Code example for BluetoothDevice

Methods: createRfcommSocketToServiceRecord

            BluetoothSocket tmp = null;
            // Get a BluetoothSocket for a connection with the 
            // given BluetoothDevice 
            try { 
                tmp = device.createRfcommSocketToServiceRecord(MY_UUID);
            } catch (IOException e) {
                Log.e(TAG, "create() failed", e);
            mmSocket = tmp;
        public void run() { 
        	RhoBluetoothManager.logi(TAG, "BEGIN mConnectThread");
            // Always cancel discovery because it will slow down a connection 
            // Make a connection to the BluetoothSocket 
Stop searching for code, let great code find you!  Add Codota to your java IDE