question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uri downloadUrl = taskSnapshot.getDownloadUrl(); not working

See original GitHub issue

getDownloadUrl() does not seem to exist anymore. Looking at the firebase-documentation it looks like this method is called on the reference now not taskSnapShot. I have tried the following but the image is not uploaded:

StorageReference taskSnapshotStorage = taskSnapshot.getStorage();
                       Uri downloadUrl = taskSnapshotStorage.getDownloadUrl().getResult();

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

15reactions
kevinkoechcommented, Feb 9, 2019

I faced the same problem but I got the answer

Just add .getStorage() infront of .getDownloadurl

to be like this below

.getStorage().getDownloadUrl 

LEAVE EVERYTHING IN THAT LINE DONT ALTER JUST ADD .getStorage()

13reactions
AmrDevelopercommented, Aug 27, 2018

Try using this

Task<Uri> task = taskSnapshot.getMetadata().getReference().getDownloadUrl();
task.addOnSuccessListener(new OnSuccessListener<Uri>() {
       @Override
        public void onSuccess(Uri uri) {
              String photoLink = uri.toString();
        }
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

taskSnapshot.getDownloadUrl() method not working
Use Firebase storage version 15.0.0. Uri downloadUrl=taskSnapshot.getDownloadUrl().
Read more >
UploadTask.TaskSnapshot | Firebase - Google
the session Uri, valid for approximately one week, which can be used to resume an upload later by passing this value into StorageReference#putFile(Uri, ......
Read more >
Android – taskSnapshot.getDownloadUrl() method not working
firebaser here This answer is wrong. While it at first may appear to work (since it compiles) the result of getDownloadUrl().toString() is not...
Read more >
What do I use instead of .getdownloadurl in android firebase?
Solved: I changed. Java. Uri firebaseUri = taskSnapshot.getDownloadUrl(); to. Java. Task<Uri> firebaseUri = taskSnapshot.getStorage().
Read more >
getDownloadUrl is removed / deprecated / not showing / working
getDownloadUrl is removed / deprecated / not showing / working | Android ... (angular bracket) Uri() (angular bracket){ @Override public void ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found