I am uploading an image from my local storage to firebase, although with my code I would like to get that uploaded image URL and store it into a string. How can I do this?
StorageReference filepath1 = mStorage.child("Blog_Image").child(mcontentURI.getLastPathSegment() + random());
final String c;
filepath1.putFile(mcontentURI).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
final Uri downlaodUrl = taskSnapshot.getDownloadUrl();
String b = downlaodUrl.toString();
c = b;
}
});