This getDownloadUrl() method showed deprecated after updating to
\'com.google.firebase:firebase-storage:15.0.2\'
In the docs it says this:
The
getDownloadUrl()andgetDownloadUrls()methods of theStorageMetadataclass are now deprecated. UsegetDownloadUrl()fromStorageReferenceinstead.
So you need to use getDownloadUrl() that is inside the StorageReference
public TaskgetDownloadUrl () Asynchronously retrieves a long lived download URL with a revokable token. This can be used to share the file with others, but can be revoked by a developer in the Firebase Console if desired.
more information here:
https://firebase.google.com/docs/reference/android/com/google/firebase/storage/StorageReference#getDownloadUrl()