I've tried this
try {
byte[] decodedString = Base64.decode(repPlus, Base64.URL_SAFE);
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
holder.imageView.setImageBitmap(decodedByte);
} catch (Exception e) {
Log.d("Error: ", e.getMessage());
}
And it returns an error:
bad base-64
And then I've tried this Bad base-64 error. And it removes the error. And Base64 to Bitmap to display in ImageView for decoding a base64 String
try {
String repSlash = product.getImage().replace("/", "_");
String repPlus = repSlash.replace("+", "-");
byte[] decodedString = Base64.decode(repPlus, Base64.URL_SAFE);
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
holder.imageView.setImageBitmap(decodedByte);
} catch (Exception e) {
Log.d("Error: ", e.getMessage());
}
But the image does not views in the application.