Is there any way to store image files in firebase using Java api to be used for android application?
I have read this thread Can I store image files in firebase using Java API and still there is no answer. I know that there is an official api for it, called firepano here is the link https://github.com/firebase/firepano but it is for Javascript library.
is there any solution for Java library??
I used this code and now it's working:
Bitmap bmp = BitmapFactory.decodeResource(getResources(),
R.drawable.chicken);//your image
ByteArrayOutputStream bYtE = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, bYtE);
bmp.recycle();
byte[] byteArray = bYtE.toByteArray();
String imageFile = Base64.encodeToString(byteArray, Base64.DEFAULT);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With