You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@adibsyahmi17 unfortunately, TaskSnapshot does not have a getDownloadUrl() method. You'll need to call that method on the StorageReference that you created to upload the file.
@adibsyahmi17 unfortunately, TaskSnapshot does not have a getDownloadUrl() method. You'll need to call that method on the StorageReference that you created to upload the file.
can you show me how because this is my first time using android studio
Activity
thatfiredev commentedon May 26, 2022
@adibsyahmi17 unfortunately, TaskSnapshot does not have a
getDownloadUrl()method. You'll need to call that method on theStorageReferencethat you created to upload the file.adibsyahmi17 commentedon May 26, 2022
can you show me how because this is my first time using android studio
thatfiredev commentedon May 26, 2022
@adibsyahmi17 Can you show the code where you create the
StorageReference? The one that comes before thisonSuccesscode that you posted here.adibsyahmi17 commentedon May 26, 2022
if (imageURI != null){
StorageReference fileReference = storageReference.child(System.currentTimeMillis()
+ "." + getFileExtension(imageURI));
fileReference.putFile(imageURI)
.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@OverRide
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@OverRide
public void run() {
mProgressBar.setProgress(0);
}
}, 500);
this is my code
thatfiredev commentedon May 27, 2022
@adibsyahmi17 Thanks for providing the code. You'll need to change your onSuccess method to reuse the
StorageReferencethat you created: