I'm making an app in Android Studio. I'm stuck because of the following problem.
I want to change the room String in the first line to the value of the room String in void onDataChange. I've tried so many things but it keeps having the value null. 

```
 private String room;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        ref = new Firebase("https://firebase.com/users/" + getPhoneId().toString() + "/" + receivingUser.toString());
        ref.addListenerForSingleValueEvent(new ValueEventListener() {
            public void onDataChange(DataSnapshot snapshot) {
                room = (String) snapshot.child("room").getValue().toString();
                setRoom(room);
            }
            public void onCancelled(FirebaseError firebaseError) {
            }
        });
        super.onCreate(savedInstanceState);
        mFirebaseRef = new Firebase(FIREBASE_URL).child("chat/" + room);

```