title: How to retrieve data from Firebase database without listeners?
body: <p>Right now I'm developing an android app, and I just started to work with Firebase.</p>
  
  <p>My question is: How can I retrieve data from the firebase database, without use listeners ?</p>
  
  <p>In my game, I'm saving the high scores of all the users, and I need to take the data from the database when user go into "leader-boards" page.</p>
  
  <p>I saw some solutions, which is not good for my case.
  One of them is:</p>
  
  <pre><code>mRef.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              String value = dataSnapshot.getValue(String.class);
          }
  
          @Override
          public void onCancelled(FirebaseError firebaseError) {
  
          }
      });
  </code></pre>
  
  <p>This solution is not good for me, because I cant afford to my app to go into the server every time high score of user is changing, because if I would have 20,000 people who playing at the same time, then the game will stuck.</p>
  
  <p>so I cant use this listener, because it will make the game very slow.</p>
  
  <p>My goal is to to find a way to change the high score, without alerting the other people who is currently playing the game, I mean that I need to update every user score for his own, and when user go to the "leader boards" page, only then I will go to the server.</p>
  
  <p>what is the right solution here ? </p>
  
  <p>Or can I use this listener in another way?</p>
  
  <p>If my question is not clear, then ask me in the comment please.</p>
  
  <p>Thank you !!</p>
  
  <p>my lines: </p>
  
  <pre><code> public static void setUserHighScoreToServer(Context context,boolean isClassic,int scoreNum)
  {
      com.firebase.client.Firebase mRef;
      mRef= new com.firebase.client.Firebase("...");
      String name = InternalStorage.getUserName(context);
      String classic = "";
      if(isClassic)classic="Classic";
      else classic="Arcade";
      com.firebase.client.Firebase mRefChild = mRef.child(name+classic);
      mRefChild.setValue(String.valueOf(scoreNum));
  
  
  }
  </code></pre>