First of all, did you update the manifest with the right permissions?
The following permissions needed to be included:
<manifest ... >
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
...
</manifest>
Before continuing to the next phase, make sure the device is already paired up.
You can simply check the paired state with:
if(device.getBondState()==device.BOND_BONDED)
Get the correct UUID(example):
private static final UUID MY_UUID = UUID.fromString("0000110E-0000-1000-8000-00805F9B34FB");
You must be able to get a socket at this point.
mSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);
Read the socket:
mSocket.connect();
InputStream input = mSocket.getInputStream();
DataInputStream dinput = new DataInputStream(input);
You can read it later on with:
dinput.readFully(byteArray, 0, byteArray.length);