Tuesday 3 April 2012

Android Byte Array to Drawble

You can use this method to convert a byte array (which is in the original an image) to Android Drawable


public Drawable getDrwableFromBytes(byte[] imageBytes) {

if (imageBytes != null)
return new BitmapDrawable(BitmapFactory.decodeByteArray(imageBytes,
0, imageBytes.length));
else
return null;
}


Mohammad Abu Hmead