I\'m trying to create a basic bluetooth application, for testing the device.
I got the code from developer.android. Here is the link : http://developer.android.com/
Its working for me
BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID); Method m = device.getClass().getMethod("createInsecureRfcommSocket", new Class[] {int.class}); socket = (BluetoothSocket) m.invoke(device, 1); bluetoothAdapter.cancelDiscovery(); socket.connect();