Skip to content

Instantly share code, notes, and snippets.

@jirawatee
Last active April 17, 2019 05:47
Show Gist options
  • Select an option

  • Save jirawatee/154aa5c174eb643a4ff93421f9d5f55e to your computer and use it in GitHub Desktop.

Select an option

Save jirawatee/154aa5c174eb643a4ff93421f9d5f55e to your computer and use it in GitHub Desktop.
Firebase Storage - Download data via url
private void downloadDataViaUrl() {
Helper.showDialog(this);
imageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Helper.dismissDialog();
mTextView.setText(uri.toString());
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
Helper.dismissDialog();
mTextView.setText(String.format("Failure: %s", exception.getMessage()));
}
});
}
@olciaa
Copy link

olciaa commented Jul 28, 2017

@olciaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment