title: limitToFirst in Firebase Query Reference not working on Android
body: <p>Below is my firebase structure:</p>
  <p><a href="https://i.stack.imgur.com/BNdgy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BNdgy.png" alt="enter image description here" /></a></p>
  <hr />
  <p>Code I  am using to set the limit to data :</p>
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
      connectDetector = new ConnectDetector(getActivity());
      if(connectDetector.getConnection()) {
          alanRef = new Firebase(firebaseURL).child(EventChatActivity.SuperCateName + &quot;/ &quot; + eventDetail.getCategory_name() + &quot;/ &quot; + eventDetail.getEvent_title() + &quot;/ &quot; + EventChatActivity.eventID).child(&quot;StadiumChat&quot;);
          alanRef.limitToFirst(mPageLimit).startAt(mPageEndOffset);
          userName = MyApp.preferences.getString(MyApp.USER_NAME, null);
  
      }
  }
  </code></pre>
  <p>This code gives me all the child in that specific node.</p>
  <p>Please suggest what should be added to set limit to it.</p>
  <hr />
  <h1>Update:</h1>
  <blockquote>
  <p>I have added limit to First then I checked documentation which says set OrderBy also to it.</p>
  </blockquote>
  <p>So in which order should I set to get the proper results.</p>
  <p>My URL: <a href="https://wazznow-cd155.firebaseio.com/Cricket/%20IPL/%20MI%20vs%20XXR/%20ABC123/StadiumChat.json?limitToFirst=10&amp;orderBy=%22%22&amp;print=pretty" rel="nofollow noreferrer">https://wazznow-cd155.firebaseio.com/Cricket/%20IPL/%20MI%20vs%20XXR/%20ABC123/StadiumChat.json?limitToFirst=10&amp;orderBy=%22%22&amp;print=pretty</a></p>