title: How to display Bitmap Image in Android
body: <p>I am making an application in which i am getting an Mjpg Images from Live IP Camera in Android.</p>
  
  <p>The problem is that since when i get the Image in the form of <code>ByteArray</code>. How can I display the <code>Image</code>?</p>
  
  <p>I'm using the following code to display the image:</p>
  
  <pre><code>ImageView imageView = (ImageView) findViewById(R.id.imageView1);
  Bitmap bmp = BitmapFactory.decodeByteArray(buffer, start, a);
  imageView.setImageBitmap(bmp);
  </code></pre>
  
  <p>but i m getiing an exception</p>
  
  <pre><code>android.view.ViewRoot CallFromWrongThreadException
  </code></pre>
  
  <p>Please explain how to display the bytearray on android layout.</p>