I am trying to get download url from firebase
but it gives me some another link like "com.google.android.gms.tasks.zzu@b9761c8"
Asked
Active
Viewed 3,871 times
1

AskNilesh
- 67,701
- 16
- 123
- 163

Ekdanai Nantaharn
- 11
- 1
- 5
-
You need to share your code as **TEXT** not as **IMAGE** – AskNilesh Sep 12 '18 at 04:42
-
Check this [How to Get Image URL after uploading an image form android to Firebase?](https://stackoverflow.com/questions/44686647/how-to-get-image-url-after-uploading-an-image-form-android-to-firebase) – AskNilesh Sep 12 '18 at 04:45
1 Answers
1
You need to add listeners when retrieving the url.
Please read the documentations
taskSnapshot.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
// Got the uri
ImageUpload imageUpload = new ImageUpload(editText5.getText().toString(), uri.toString());
// Wrap with Uri.parse() when retrieving
String uploadId = mDatabaseRef.push().getKey();
mDatabaseRef.child(uploadId).setValue(imageUpload);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Handle any errors
}
});

jbmcle
- 771
- 3
- 12
-
-
@EkdanaiNantaharn I updated the answer, you should know where to replace. – jbmcle Sep 12 '18 at 06:02
-
-
-
-
Hi jake / HOW TO Retrieve Image from URL using Firebase Realtime Database in Android How to do ? – Ekdanai Nantaharn Sep 12 '18 at 14:45
-
-
HOW TO Retrieve Image from URL using Firebase Realtime Database code – Ekdanai Nantaharn Sep 16 '18 at 16:33
-
@EkdanaiNantaharn Since you are asking a different question, you should ask/create a different question – Leonardo Sibela Sep 03 '19 at 19:32