title: setValue() not working in firebase realtime database
body: <p>I'm trying to create new data in the firebase realtime database
  I tried to use a HashMap and an object, none of them works.
  even when I put the OnComplete/OnSuccess/OnFailure listeners I don't receive any data in the log.</p>
  
  <pre><code>private void registerUser(final String displayName, String email, String password) {
          mAuth.createUserWithEmailAndPassword(email, password)
                  .addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                          if (task.isSuccessful()) {
                              FirebaseUser currentUser = mAuth.getCurrentUser();
                              String uid = currentUser.getUid();
                              HashMap&lt;String, String&gt; userMap = new HashMap&lt;&gt;();
                              User user = new User(displayName, "Bonjour!", "par defaut", "def");
                              userMap.put("name", displayName);
                              userMap.put("status", "Bonjour!_Je_viens_de_m'inscirire");
                              userMap.put("image", "par_defaut");
                              userMap.put("thumb_image", "def");
                              Log.d(TAG, "onComplete: " + userMap);
                              Log.d(TAG, "onComplete: " + user);
                              mDatabaseReference = FirebaseDatabase.getInstance().getReference("Users").child(uid);
                              mDatabaseReference.setValue(user)
                                      .addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
                                          @Override
                                          public void onSuccess(Void aVoid) {
                                              Log.d(TAG, "onSuccess: ");
                                          }
                                      })
                                      .addOnFailureListener(new OnFailureListener() {
                                          @Override
                                          public void onFailure(@NonNull Exception e) {
                                              Log.d(TAG, "onFailure: " + e.getMessage());
                                          }
                                      });
                              Log.d(TAG, "onComplete: " + mDatabaseReference);
  mRegProgressBar.setVisibility(View.GONE);
                              Intent maintIntent = new Intent(RegisterActivity.this, MainActivity.class);
                              maintIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                              startActivity(maintIntent);
                              finish();
  
                          } else {
                              getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
                              mRegProgressBar.setVisibility(View.GONE);
                              Toast.makeText(RegisterActivity.this, "impossible d'inscrire, veuillez ressayer!", Toast.LENGTH_LONG).show();
                          }
  </code></pre>
  
  <p>I tried adding this code and it gives me :" not connected " in the log.</p>
  
  <pre><code>//check if connected
                              DatabaseReference connectedRef = FirebaseDatabase.getInstance().getReference(".info/connected");
                              connectedRef.addValueEventListener(new ValueEventListener() {
                                  @Override
                                  public void onDataChange(@NonNull DataSnapshot snapshot) {
                                      boolean connected = snapshot.getValue(Boolean.class);
                                      if (connected) {
                                          Log.d(TAG, "connected");
                                      } else {
                                          Log.d(TAG, "not connected");
                                      }
                                  }
  
                                  @Override
                                  public void onCancelled(@NonNull DatabaseError error) {
                                      Log.w(TAG, "Listener was cancelled");
                                  }
                              });
  </code></pre>
  
  <p>the HashMap contains the actual data but the setValue() method does not work for some reason. When I look in the firebase console there are no changes.</p>