How can I pass a base64
encoded string to another page. I have tried with this but the program freezes when this code running
base64String= base64FromBitmap(capturedImage);
intent.putExtra("BASE64IMAGE", base64String]); // Freezes on this line
This is the base64
convert
method. It works without problems
private static String base64FromBitmap(Bitmap bmp){
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream .toByteArray();
String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);
return encoded;
}