I have an android app and a Firebase database. The login I've set is with email and password. It works great, but when I try and login with blank email and password the app crashes.
Here is my code
final String Email = email.getText().toString();
final String Password = password.getText().toString();
mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(ThisActivity.this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (!task.isSuccessful()) {
Toast.makeText(ThisActivity.this, "sign in error", Toast.LENGTH_SHORT).show();
} else
mAuth.addAuthStateListener(firebaseAuthListener);
}
});
break;