I am reading data from a BluetoothSocket (SPP) and I want to read it using a buffered reader.
// Written out of mind. May contain a typo.
myBluetoothSocket s = ...;
InputStream a = s.getInputStream();
InputStreamReader b = new InputStreamReader(a);
BufferedReader c = new BufferedReader(b);
Log.d("####"+c.ready());
At one of my phones, it is working.
On another phone, c.ready() is blocking. The documentation does not mention that this function may block. If I turn off the remote Bluetooth device, nothing does change - the thread stays blocked.