title: Firebase data ordering
body: <p>I feel as if I'm missing something big when I use firebase in my android app. I have been using</p>
  
  <pre><code>push();
  </code></pre>
  
  <p>to put my data in firebase with a unique id.
  I have been accessing this data in an activity using the ChildEventListener:</p>
  
  <pre><code>ref.addChildEventListener(new ChildEventListener() {         
      // Retrieve new posts as they are added to the database
      @Override public void onChildAdded(DataSnapshot snapshot, String previousChildKey) {
          Map&lt;String, Object&gt; newPost = (Map&lt;String, Object&gt;) snapshot.getValue();
      }
  });
  </code></pre>
  
  <p>I believe that</p>
  
  <pre><code>snapshot.getValue()
  </code></pre>
  
  <p>should provide me with all my unique ids but how do I order them to display them in order from newest to oldest?</p>
  
  <p>Thanks for your help!</p>