0

I am unable to use android app to get a clickable link to pdf file uploaded to firebase storage with firebase storage version 19. (com.google.firebase:firebase-storage:19.1.1).

addOnSuccessListener snippet:

.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
    @SuppressWarnings("VisibleForTests")
    @Override
    public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
        progressBar.setVisibility(View.GONE);
        textViewStatus.setText(R.string.file_uplod_success_msg);
        Log.d(TAG, "onSuccess: FileName is:" + FileName);
        String url = tasksnapshot.getMetadata().getReference().getDownloadUrl().toString();
        Log.d(TAG, "onSuccess: URL :"+ url);
        Upload upload = new Upload(editTextFilename.getText().toString(), url);
        mDatabaseReference.child(mDatabaseReference.push().getKey()).setValue(upload);
    }
})

The url returned in my debug log: Log.d(TAG, "onSuccess: URL :"+ url); is onSuccess: URL: com.google.android.gms.tasks.zzu@f9fc59b which is not a clickable link.

Ergin Ersoy
  • 890
  • 8
  • 28
MIike Eps
  • 421
  • 7
  • 24

0 Answers0