• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7597
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7597
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 665
10
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic