0

This is screenshot of Firebase Storage

How can i retrieve 1 image at a time using Picasso to display as a Profile Picture of currently logged-in user?? I saw many other solutions on stackoverflow but all of them were related to Recycler View for displaying all images in list format. In short how can I make a reference to Firebase Storage to fetch image? Thanks in advance.

Vicky Gupta
  • 60
  • 1
  • 12
  • 1
    hope this helps you https://stackoverflow.com/questions/52651815/how-to-place-a-firebase-generated-url-into-an-imageview-with-glide/52652077#52652077 – mayank modi Apr 19 '20 at 11:27
  • 1
    This question already exists here: https://stackoverflow.com/questions/37374868/how-to-get-url-from-firebase-storage-getdownloadurl – Gaurav Mall Apr 19 '20 at 11:49
  • yes it worked thanks a lot to all who suggested links – Vicky Gupta Apr 19 '20 at 11:57

1 Answers1

2

In short, how can I make a reference to Firebase Storage to fetch the image?

In order to be able to get an image from Firebase Storage, you need to know its path. If you need to get that path directly from the Firebase Console, you should click on an image, and on the right-hand side will see a section named File location. Inside this section, under the Access token, you'll see the actual access token of the image. Simply clicking on the token, will copy the entire download URL in the clipboard. Paste it in your project and that's it.

If you need it programmatically, please check my answer from the following post:

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193