title: Wrong format while i getInputStream() on Android Studio from HC-06 BL Device
body: <p>I use this AsyncTask to get lot of string from the HC-06.
  I correct receive them but sometimes the string appear on different lines on a ListView.</p>
  
  <p>For example if i send on arduino Ide jghv i got j on first line and ghv on the second
  D/BLE_Activity: j
  D/BLE_Activity: ghv     </p>
  
  <p>Can someone please tell me what i'm doing wrong?</p>
  
  <pre><code>private class Stream extends AsyncTask&lt;Void, Void, Void&gt;  
  {
  
      protected Void doInBackground(Void... devices)
      {
          try {
              while (btSocket.isConnected()) {
  
                  char[] buffer = new char[256];
                  int bytes;
                  InputStream tmpIn = btSocket.getInputStream();
                  InputStreamReader red = new InputStreamReader(tmpIn);
                  bytes = red.read(buffer);
                  String readMessage = new String(buffer, 0, bytes);
  
                  Log.d(TAG, readMessage);
  
                  Array.add(readMessage);
  
                  if (isCancelled()) break;
  
              }
          } catch (IOException e) {
  
          }
          return null;
      }
  }
  </code></pre>
  
  <p>This is how I create the ListView</p>
  
  <pre><code>adapter = new ArrayAdapter&lt;String&gt;(
              this, android.R.layout.simple_spinner_item, Array);
  
  
  
  adapter.setDropDownViewResource(
                               android.R.layout.simple_spinner_dropdown_item);
  
  sItems = (ListView) findViewById(R.id.Stream);
  sItems.setAdapter(adapter);
  </code></pre>
  
  <p>And this is the declaration of Array and adapter</p>
  
  <pre><code> List&lt;String&gt; Array = new ArrayList&lt;String&gt;();
   ArrayAdapter&lt;String&gt; adapter;
  </code></pre>
  
  <p>Thank to all of you </p>