Looks good?
public static Bitmap stringToImage(String base64) {
byte[] decodedString = decode(base64, Base64.DEFAULT);
return BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
}
this code returns null, if my base64 string starts with "data:image/jpeg;base64,". but if I remov this prefix - this code works fine! How to solve this problem?
I tested my base64 string and it works fine (comment 1 How to display Base64 images in HTML?)