1

I am struggling with an issue in android that I need to parse byte array value which comes from JSON and show it on android device.For that I have written this

String base64Str = jsonObject.getString("dealimage");
   byte[] byteArray =  Base64.decode(base64Str.getBytes(), Base64.DEFAULT) ;
   Bitmap bmp1 = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
    imgView.setImageBitmap(bmp1);

here bmp1 returns null value.can you please tell me why its returning null and solution.

Prathyusha
  • 169
  • 2
  • 10

0 Answers0