How to use getdownloadurl in recent versions?

后端 未结 4 636
庸人自扰
庸人自扰 2020-11-22 00:29
                Uri downloaduri=taskSnapshot.getDownloadUrl();//here i cant use getdownloadurl() function
                DatabaseReference new_prod=db.push();
              


        
4条回答
  •  无人共我
    2020-11-22 01:03

    Below method worked for me.

        _fbs_upload_success_listener = new OnSuccessListener() {
                @Override
                public void onSuccess(UploadTask.TaskSnapshot _param1) {
    
                    Task urlTask = _param1.getStorage().getDownloadUrl();
                    while (!urlTask.isSuccessful());
                    Uri downloadUrl = urlTask.getResult();
                    String _downloadUrl = downloadUrl.toString();
       };
    

提交回复
热议问题