June 2018
Beginner to intermediate
394 pages
9h 2m
English
One of the crucial aspects that developers need to consider is that the application should be able to re-initiate the uploading process or should let the user know on the event of upload failure. To achieve this, we need a mechanism for monitoring the file upload process. In a way, Firebase's UploadTask allows developers to attach listeners to it:
uploadTask.addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { // Upload failed }}).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() { @Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { // Upload succeeded }});
To monitor the file upload, developers can add the onSuccess and ...
Read now
Unlock full access