• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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: 5412
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: 5412
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 Hand
Posts: 201
2
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.
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!