Firebase retrieve/read returns null values - Android
<p>Using Firebase docs for retrieving data with:</p>

<pre><code>ref.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(DataSnapshot snapshot) {
        System.out.println(snapshot.getValue());
    }
    @Override
    public void onCancelled(FirebaseError firebaseError) {
        System.out.println("The read failed: " + firebaseError.getMessage());
    }
}); 
</code></pre>

<p>Running the above produced: </p>

<blockquote>
  <p>{users={facebook:###############={posts={-KE8qg1VyPAwYj0uJDcn={status=update1}}, provider=facebook, displayName=Some Name}}}</p>
</blockquote>

<p>Created class to represent users:</p>

<pre><code>@JsonIgnoreProperties(ignoreUnknown=true) //to ignore mapping issues
public class Users {

String status;
String displayName;
String provider;

public Users() {
        // empty default constructor
}

public String getStatus() {
    return status;
}

public String getName(){
    return displayName;
}

public String getProvider(){
    return provider;
}
}
</code></pre>

<p>Using the following to attempt to retrieve values:</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) {
            Users newUser = snapshot.getValue(Users.class);
            System.out.println("Status: " + newUser.getStatus());
            System.out.println("Display Name: " + newUser.getName());
            System.out.println("Provider: " + newUser.getProvider());
        }
</code></pre>

<p>Everything returns a null? Read over &amp; tried several examples of using for loops to iterate over the database but those failed as well so I decided to come back to the first version. Not certain which way is best for this situation?</p>