problem when implementing the FirebaseAuthListener any suggestions?
problem when implementing the FirebaseAuthListener any suggestions?
FirebaseAuth.AuthStateListener
is an interface so you have to provide an implementation at the time of initialization.
Change:
FirebaseAuthStateListener = new FirebaseAuth.AuthStateListener();
By:
FirebaseAuthStateListener = new FirebaseAuth.AuthStateListener(){
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null) {
// ...
}
}
};
And the second error is telling you that the resource R.id.Contraseña
is a TextView
in the XML but you are trying to convert it to EditText
, something that will be impossible. Go to your XML and change it to <EditText />
.