in my app I am getting the byte[]
from server and I need to show it on imageview
so I wrote this code:
byte[] im = allUsers.get(i).getPhoto().getBytes();
Bitmap bmp = BitmapFactory.decodeByteArray(im, 0, im.length);
((ImageView) dialog.findViewById(R.id.image)).setImageBitmap(bmp);
But bmp
is always null
. So what can be the problem?