recordingStream = Connection.getInputStream(); for (int i = 0; i < 1; i++) { // 1 раз 1 байт. if (recordingStream.read(buffer, 0, ikk) != -1 && isRecording) { //writer.write(buffer, 0, ikk); String lin = new String(buffer, 0, ikk); //из потока в String(?) прочитался один байт - ikk=1 } }
Next you need to read lin
and output it hex (hex there is: 04
Here is 04
and you need to read it in the next String
as text).
Simply put, decode one byte from hex into text.