How do I convert a large Bitmap (photo taken with the phone's camera) to a Base64 String?
use following method to convert bitmap to byte array:
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream .toByteArray();
to encode base64 from byte array use following method
String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);