This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

How do I upload image to firebase and retrieve it using picasso  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am following a tutorial that shows you how to create an app like WhatsApp but I am having a very very hard time with one problem.

When the user goes to their SettingsActivity they see their default image, name and status. When I click on the default image, I go to the gallery on my phone and select the image I want to use. When I select it I crop out the image and then I hit the word crop in the top right hand corner. I get the message that it's cropping the image and then it says the image upload was successful.

When I look in my Firebase Database, this is what I see the image is stored as "com.google.android.gms.tasks.zzu@44d8fb0".

SettingsActivity :

 
Saloon Keeper
Posts: 5496
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I see the image is stored as "com.google.android.gms.tasks.zzu@44d8fb0".


That looks like a Java object reference, but not of an image, specifically - it's obfuscated. Where do you "see" that? At a quick glance I don't see a line of code that would print out that object reference.
 
Brandon Jacobs
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:

I see the image is stored as "com.google.android.gms.tasks.zzu@44d8fb0".


That looks like a Java object reference, but not of an image, specifically - it's obfuscated. Where do you "see" that? At a quick glance I don't see a line of code that would print out that object reference.



It's in my firebase database
 
Tim Moores
Saloon Keeper
Posts: 5496
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which line of code is supposed to store the image? Apparently it's trying to store something entirely different.
 
Brandon Jacobs
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it's this one. I'm not entirely sure. I have done some Java but never uploading an image
 
Ranch Foreman
Posts: 257
3
Android Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will suggest you to upload image and text by using below method.

In UpdateSettings function, create an Item class.


Item class

Noted that I am passing the Uri to firebase. So when you want to retrieve, you can get a valid url.
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!