Arduino - Receive data from bluetooth device <p>i've problem to receive data from Arduino. If I send "T" from Eclipse, start humidity sensor, but I can't receive string from serial monitor for appair on textview.</p> <pre><code> void beginListenForData() {try {final Handler handler = new Handler();// This is the ASCII code for a newline characterfinal byte delimiter = 10;stopWorker = false;readBufferPosition = 0;readBuffer = new byte[1024];workerThread = new Thread(new Runnable() {public void run() {while (!Thread.currentThread().isInterrupted()&amp;&amp; !stopWorker) {try {int bytesAvailable = mmInputStream.available();if (bytesAvailable &gt; 0) byte[] packetBytes = new byte[bytesAvailable];mmInputStream.read(packetBytes);for (int i = 0; i &lt; bytesAvailable; i++) {byte b = packetBytes[i];if (b == delimiter) {byte[] encodedBytes = new byte[readBufferPosition];System.arraycopy(readBuffer, 0,encodedBytes, 0,encodedBytes.length);final String data = new String(encodedBytes, "US-ASCII");readBufferPosition = 0;handler.post(new Runnable() {public void run() {tv_temperatura.setText(data);}});} else {readBuffer[readBufferPosition++] = b; }}}} catch (IOException ex) {stopWorker = true; }} } }); workerThread.start();} catch (NullPointerException e) { e.printStackTrace();} catch (Exception e) { e.printStackTrace();} } </code></pre>