Firebase - Because it does not execute the code of addOnCompleteListener

0

How does the addOnCompleteListener work, is it not a listener that will be called when the signInWithEmailAndPassowrd operation is executed? It enters a correct login and password and I click on the button it arrives until the task.addOnCompleteListener but it does not enter the onComplete method.

Task<AuthResult> task = mFirebaseAuth.signInWithEmailAndPassword(user.getEmail(), user.getPassword());



                task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        Task<AuthResult> taskUser = task;
                        Log.i("app", "Sucesso - " + taskUser.isSuccessful());
                        if (taskUser.isSuccessful()) {
                            booSucessLogin = true;
                            mFirebaseInteractionLogin.sucessSiginUp(user);
                        }else{
                            booSucessLogin = false;
                            Log.i("app", "Falha - " + taskUser.getException().toString());

                            mFirebaseInteractionLogin.errorSiginUp("The email address is badly formatted", taskUser.getException());
                        }

                    }
                });
    
asked by anonymous 24.02.2018 / 15:36

1 answer

1

Strange, I tested it on another device and it worked.

I have seen some reports of the same problem and may also be the implementation 'com.google.android.gms:play-services-auth:X.x.x outdated in the project.

Or where google play may be outdated in the app !!!

    
24.02.2018 / 21:11