I'm creating an apps for my final year project. So i want to use login and signup features. But when i enter the details of the signup, its keep fail and do not direct the data to the firebase.
Signup.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (validate()){
String Email = email.getText().toString().trim();
String Password = password.getText().toString().trim();
firebase.createUserWithEmailAndPassword(Email, Password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()){
Toast.makeText(Signup.this, "Signup successful", Toast.LENGTH_SHORT).show();
startActivity(new Intent(Signup.this, LoginPage.class));
}
else
{
Toast.makeText(Signup.this, "Signup failed", Toast.LENGTH_SHORT).show();
}
}
});
}
}
});
So, is there anything that i have to change?