title: (Android, Firebase) databasereference.push().setValue() not working even though log says otherwise
body: <p>I'm testing Firebase by building an app that simply puts a message in the Database (authorisations are set to true for the test), it worked only once, and now nothing is pushed to the database. But as you can see I put logs everywhere to see where the problem is and surprisingly the <code>onChildEventListener()</code> seems to notice a change.</p>
  
  <p>Here is the code for my main activity : </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      public final static String TAG = "Main Activity";
  
      public final int[] id = {0};
  
      Button sendButton;
  
      EditText messageEditText;
  
      String message;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          id[0] = 0;
  
          sendButton = findViewById(R.id.send_message);
  
          messageEditText = findViewById(R.id.message_text);
  
          final DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference("test/geomessage/");
  
          sendButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
  
                  message = messageEditText.getText().toString();
  
                  Log.e(TAG, "Test 1");
                  GeoMessage currentGeomessage = new GeoMessage(id[0], message);
  
                  Log.e(TAG, "Test 2");
  
                  databaseReference.child("children").push().setValue(currentGeomessage).addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
                      @Override
                      public void onSuccess(Void aVoid) {
                          Log.e(TAG, "Success !");
                      }
                  }).addOnFailureListener(new OnFailureListener() {
                      @Override
                      public void onFailure(@NonNull Exception e) {
                          Log.e(TAG, "FAIL");
                      }
                  }).addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;Void&gt; task) {
                          Log.e(TAG, "Complete");
                      }
                  });
  
                  Log.e(TAG, "Test 3");
              }
          });
  
  
          databaseReference.child("children").addChildEventListener(new ChildEventListener() {
              @Override
              public void onChildAdded(DataSnapshot dataSnapshot, String s) {
                  Log.e("101", "Child Added !");
                  id[0] = (int) dataSnapshot.getChildrenCount();
              }
  
              @Override
              public void onChildChanged(DataSnapshot dataSnapshot, String s) {
                  Log.e("101", "Child CHanged !");
                  id[0] = (int) dataSnapshot.getChildrenCount();
  
              }
  
              @Override
              public void onChildRemoved(DataSnapshot dataSnapshot) {
  
              }
  
              @Override
              public void onChildMoved(DataSnapshot dataSnapshot, String s) {
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
  
  
      }
  
  
      private static class GeoMessage {
  
          int id;
          String content;
  
          public GeoMessage() {};
  
          public GeoMessage(int id, String content) {
  
              this.id = id;
              this.content = content;
  
          }
  
          public String getContent() {
              return content;
          }
  
          public void setContent(String content) {
              this.content = content;
          }
      }
  
  }
  </code></pre>
  
  <p>Here are the logs when I click on the "Send" Button : </p>
  
  <pre><code>11-03 19:02:13.338 7440-7440/com.example.brumor.geofiretest E/Main Activity: Test 1
  11-03 19:02:13.338 7440-7440/com.example.brumor.geofiretest E/Main Activity: Test 2
  11-03 19:02:13.340 7440-7440/com.example.brumor.geofiretest E/Main Activity: Test 3
  11-03 19:02:13.420 7440-7440/com.example.brumor.geofiretest E/101: Child Added !
  </code></pre>