android - Can I store image files in firebase using Java API -


Is there a way to store image files in firebase using the Java API?

Try using this snippet:

  Bitmap BMP = BitmapFinder ACRR resources (getResources (), R.drawable.chicken); // Your Image BitReon OutputStream BETE = New Bytereanputstream (); Bmp.compress (bitmap.compress format.png, 100, bte); Bmp.recycle (); Byte [] Bitere = BETE.Tobietair (); String imagefile = base64.edecodeToString (byte, base64.default);   

and to retrieve

  Public Bitmap String Automation Map (string encoded string) {try {byte [] encoded = base 64 decode (encoded string , Base 64. Default); Bitmap bitmap = bitmapfactoryDisadAbayTitre (encodedbyte, 0, encodibeta.lamp); Return bitmap; } Hold (exception e) {e. Messages (); Return tap; }}    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -