How to return a boolean value when a file is successfully uploaded inside onSuccessListener?
- 阅读更多 关于 How to return a boolean value when a file is successfully uploaded inside onSuccessListener?
问题 First look at this. I call a function uploadUserPdf() inside submitProfile() public void submitProfile() { if(!uploadUserPdf()) { return; } else { //............... } } And Here is the uploadUserPdf() function private boolean uploadUserBiodataPdf() { Uri fileUri = Uri.parse(Pdf); final StorageReference storageReference = FirebaseStorage.getInstance().getReference().child("Pictures"); StorageReference pdfRef = storageReference.child(mUser.getUid()).child(fileUri.getLastPathSegment()); pdfRef