June 2018
Beginner to intermediate
394 pages
9h 2m
English
Platforms as powerful as Firebase tend to fail at times, for many reasons such as no network, poor memory, and so on. To provide a seamless user experience, we need to know the fail cases firmly. All interface callbacks have a method for failure scenarios and we need to handle it for a better user experience. If a failure occurs and the failure handler is not doing its expected job, then we can manually attach an addOnFailureListener to extend the controls:
firebaseAuth.signInWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {@Overridepublic void onComplete(@NonNull Task<AuthResult> task) { if (!task.isSuccessful()) { // Notify user of failure } } }).addOnFailureListener( ...
Read now
Unlock full access