📅  最后修改于: 2022-03-11 14:48:34.550000             🧑  作者: Mango
//check email already exist or not.
firebaseAuth.fetchSignInMethodsForEmail(email)
.addOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(@NonNull Task task) {
boolean isNewUser = task.getResult().getSignInMethods().isEmpty();
if (isNewUser) {
Log.e("TAG", "Is New User!");
} else {
Log.e("TAG", "Is Old User!");
}
}
});