1//check email already exist or not.
2 firebaseAuth.fetchSignInMethodsForEmail(email)
3 .addOnCompleteListener(new OnCompleteListener<SignInMethodQueryResult>() {
4 @Override
5 public void onComplete(@NonNull Task<SignInMethodQueryResult> task) {
6
7 boolean isNewUser = task.getResult().getSignInMethods().isEmpty();
8
9 if (isNewUser) {
10 Log.e("TAG", "Is New User!");
11 } else {
12 Log.e("TAG", "Is Old User!");
13 }
14
15 }
16 });
17