Everything was working great... until I came back to work from a 3 month break and updated my Firebase from 9.8 to 10.0.1
Now all of my calls to TaskSnapshot>
I was stuck in the same issue and suppressWarnings didn't work for me. To get the complete download Uri i used the following code:
ref.putFile(imagePath).addOnSuccessListener(new OnSuccessListener() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
ref.getDownloadUrl().addOnSuccessListener(new OnSuccessListener() {
@Override
public void onSuccess(Uri uri) {
Log.d("URL", uri.toString());
// This is the complete uri, you can store it to realtime database
}
});
}
});
Hope this helps someone.