title: How to read / query data from one userID Firebase Android
body: <p>I want to retrieve data for a given user ID, which I am storing as a value in the database under each user. My database structure looks like below: </p>
  
  <pre><code>user: {
      UserID: { 
         uniqueId: {
           Name: ""
           Email: ""
           userId: ""
      }
  
      UserID: { 
         uniqueId: {
           Name: ""
           Email: ""
           userId: ""
      }
  }
  </code></pre>
  
  <p>I tried this but it doesn't seem to work as it doesn't display anything on the app:</p>
  
  <pre><code>FirebaseUser user = mAuth.getCurrentUser();
  df.child("UsersTable").orderByChild("userid").equalTo(user.getUid())).addChildEventListener
  </code></pre>
  
  <p>even when I try to give a specific value like below, it still does not read from firebase:
  ------------- Updated:</p>
  
  <p>I want to get all data from userID. so for example, I want to retrieve all information from fmXWU324VHdDb8v6h7gvNjRojnu33, which will be name, email and userid.</p>
  
  <pre><code>UserTable
  {
    "fmXWU324VHdDb8v6h7gvNjRojnu33" : {
      "-KbJtw467nl6p253HZ537" : {
        "Name" : "name1",
        "Email" : "something1@something.com",
        "userid" : "fmXWU324VHdDb8v6h7gvNjRojnu33"
      }
    },
    "pJtC45fW0MMi352UiPWnWdIS7h88" : {
      "-Kb012ls9iMnzEL723o9I" : {
        "Name" : "name2",
        "Email" : "something2@something.com",
        "userid" : "pJtC45fW0MMi352UiPWnWdIS7h88"
      },
      "-Kb0aq0q25FJq38256SrC" : {
        "Name" : "name3",
        "Email" : "something3@something.com",
        "userid" : "pJtC45fW0MMi352UiPWnWdIS7h88"
      },
      "-Kb0atopfK64F6jy124Qi1u" : {
        "Name" : "name3",
        "Email" : "something1@something.com",
        "userid" : "pJtC45fW0MMi352UiPWnWdIS7h88"
    }
  }
  </code></pre>
  
  <p>Update 2:</p>
  
  <pre><code>     DatabaseReference df= FirebaseDatabase.getInstance()
                          .getReference("user").child(getCurrentUser().getUid());   
  
  df.addChildEventListener(new ChildEventListener() {
                      @Override
                      public void onChildAdded(DataSnapshot dataSnapshot, String s) {
                          get(dataSnapshot);
                      }
              ....
              ...
  </code></pre>
  
  <p><strong>Update 3:</strong></p>
  
  <p>I assume based on what I am looking for (getting all data under defined userId) the query should look something like this:</p>
  
  <pre><code>df.child("UserTable").child(user.getUid())).addChildEventListener(new ChildEventListener() 
  </code></pre>
  
  <p>However, this is throwing this error:</p>
  
  <pre><code>Can't convert object of type java.lang.String to type com.android.example.UserTable
  </code></pre>