问题
I am trying to get download url from firebase
but it gives me some another link like "com.google.android.gms.tasks.zzu@b9761c8"

回答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
}
});
来源:https://stackoverflow.com/questions/52287588/i-am-trying-to-get-download-url-from-firebase-but-it-gives-me-some-another-link