title: convert base64 string to byte array in android
body: <p>I receive a binary base64 image as a string via a json array in my application.
  I want to convert this string to a byte array and show it in my application as an image.</p>
  
  <p>This is what I came up with:</p>
  
  <pre><code>byte[] data = Base64.decode(image, Base64.DEFAULT);
  Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length);
  thumbNail.setImageBitmap(bmp);
  </code></pre>
  
  <p>The variable <code>image</code> is the base64 string that I receive from the json array.</p>