title: Can't get value from Firebase Database DataSnapshot
body: <p>I have read many answers to this question, none solved my problem.</p>
  
  <pre><code>    ValueEventListener dataListener = new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              for(DataSnapshot ds : dataSnapshot.getChildren()) {
                  DataSnapshot ls = ds.child("/leafBox001");
                  DataSnapshot cs = ls.child("/currentState");
                  Log.i(TAG, "msg " + cs + ls + ds);
              }
  </code></pre>
  
  <p>Log returns the following:</p>
  
  <p>DataSnapshot { key = leafBox001, value = {lightSensor=6793, currentState=false} }</p>
  
  <p>DataSnapshot { key = currentState, value = null }</p>
  
  <p>DataSnapshot { key = leafBox001, value = null }</p>
  
  <p>As you can see, when I try to access a child the values become null.</p>
  
  <p>I also always get null when using getValue. Example of that code:</p>
  
  <pre><code>    ValueEventListener dataListener = new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              for(DataSnapshot ds : dataSnapshot.getChildren()) {
                  currentState = ds.child("/leafBox001").child("/currentState").getValue(Boolean.class);
                  Log.i(TAG, "msg " + cs + ls + ds);
              }
  </code></pre>
  
  <p>I have tried every variation of the above code, always null.</p>
  
  <p>RTD Structure</p>
  
  <p><a href="https://i.stack.imgur.com/mCE3dm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mCE3dm.png" alt="enter image description here"></a></p>