-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why my getDownloadUrl() has error ? #196
Comments
@adibsyahmi17 unfortunately, TaskSnapshot does not have a |
can you show me how because this is my first time using android studio |
@adibsyahmi17 Can you show the code where you create the |
if (imageURI != null){
this is my code |
@adibsyahmi17 Thanks for providing the code. You'll need to change your onSuccess method to reuse the @Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
mProgressBar.setProgress(0);
}
}, 500);
Toast.makeText(AddSolatPage.this, "Upload successful", Toast.LENGTH_LONG).show();
fileReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
String url = uri.toString();
Upload upload = new Upload(solatTitle.getText().toString().trim(), url);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Handle any errors
}
});
} |
@OverRide
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@OverRide
public void run() {
mProgressBar.setProgress(0);
}
}, 500);
The text was updated successfully, but these errors were encountered: