Here you can find the source of convertBase64ToBitmap(String data)
public static Bitmap convertBase64ToBitmap(String data) throws IOException
//package com.java2s; import java.io.IOException; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Base64; public class Main { public static Bitmap convertBase64ToBitmap(String data) throws IOException { if (isEmpty(data)) { return null; }//from www . j a va 2s.co m byte[] imageAsBytes = Base64.decode(data, Base64.DEFAULT); Bitmap bitmap = BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.length); return bitmap; } public static boolean isEmpty(String value) { return value == null || value.trim().equals("") || value.length() == 0; } }