title: problem in create user in Firebase in android
body: <p>i wrote these two functions and called theme in signup button but no user is created in Firebase.(The connection between the app and Firebase is done correctly) so whats the problem?</p>
  <pre><code>private void attemptRegistration() {
  
          // Reset errors displayed in the form.
          edtEmail.setError(null);
          edtPassword.setError(null);
  
          // Store values at the time of the login attempt.
          String email = edtEmail.getText().toString();
          String password = edtPassword.getText().toString();
  
          boolean cancel = false;
          View focusView = null;
  
          // Check for a valid password, if the user entered one.
          if (!TextUtils.isEmpty(password) &amp;&amp; !isPasswordValid(password)) {
              edtPassword.setError(getString(R.string.error_invalid_password));
              focusView = edtPassword;
              cancel = true;
          }
  
          // Check for a valid email address.
          if (TextUtils.isEmpty(email)) {
              edtEmail.setError(getString(R.string.error_field_required));
              focusView = edtEmail;
              cancel = true;
          } else if (!isEmailValid(email)) {
              edtEmail.setError(getString(R.string.error_invalid_email));
              focusView = edtEmail;
              cancel = true;
          }
  
          if (cancel) {
              // There was an error; don't attempt login and focus the first
              // form field with an error.
              focusView.requestFocus();
          } else {
              // TODO: Call create FirebaseUser() here
              createFirebaseUser();
  
          }
      }
  </code></pre>
  <hr>
  <pre><code>private void createFirebaseUser() {
  
          String email = edtEmail.getText().toString();
          String password = edtPassword.getText().toString();
  
          auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this,
                  new OnCompleteListener&lt;AuthResult&gt;() {
  
                      @Override
                      public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                          Log.d(&quot;FlashChat&quot;, &quot;createUser onComplete: &quot; + task.isSuccessful());
  
                          if (!task.isSuccessful()) {
                              Log.d(&quot;FlashChat&quot;, &quot;user creation failed&quot;);
                              showErrorDialog(&quot;Registration attempt failed&quot;);
                          } else {
                              saveDisplayName();
                              Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
                              finish();
                              startActivity(intent);
                          }
                      }
                  });
      }
  </code></pre>