title: The addValueEventListener not being called
body: <p>I am trying to get data that is stored in my database using Firebase but the <code>addValueEventListener</code> isn't being called. Below is how my database looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/YXjS9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YXjS9.png" alt="How my database Looks like"></a></p>
  
  <p>below is how my rules looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/J9GcF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J9GcF.png" alt="My rules"></a></p>
  
  <p>and below is my code:</p>
  
  <blockquote>
    <p>package com.example.user.equichange;</p>
  </blockquote>
  
  <pre><code> import android.app.ProgressDialog;
   import android.content.ClipData;
   import android.content.Context;
   import android.net.Uri;
   import android.os.Bundle;
   import android.support.annotation.NonNull;
   import android.support.annotation.Nullable;
   import android.support.design.widget.FloatingActionButton;
   import android.support.design.widget.TabLayout;
   import android.support.v4.app.Fragment;
   import android.support.v4.view.ViewPager;
   import android.support.v7.widget.GridLayoutManager;
   import android.support.v7.widget.RecyclerView;
   import android.support.v7.widget.Toolbar;
   import android.util.Log;
   import android.view.LayoutInflater;
   import android.view.View;
   import android.view.ViewGroup;
   import android.widget.ImageView;
   import android.widget.TextView;
  
   import com.firebase.client.Firebase;
   import com.firebase.client.FirebaseError;
   import com.firebase.ui.database.FirebaseRecyclerAdapter;
   import com.google.firebase.database.DataSnapshot;
   import com.google.firebase.database.DatabaseError;
   import com.google.firebase.database.DatabaseReference;
   import com.google.firebase.database.FirebaseDatabase;
   import com.google.firebase.database.ValueEventListener;
   import com.google.firebase.storage.StreamDownloadTask;
  
   import java.util.ArrayList;
   import java.util.List;
   import java.util.Map;
  
  
  
  
  
  public class NoAddOns_Tab_fragment extends Fragment {
  RecyclerView recyclerView;
  Adapter adapter;
  List&lt;ITEM&gt; list;
  String TAG = "TAG";
  
  Firebase firebasedb;
  DatabaseReference mdatabaseref;
  
  public NoAddOns_Tab_fragment() {
  
  }
  
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View view = inflater.inflate(R.layout.fragment_no_add_ons,container,false);
  
  
      return view;
  }
  
  @Override
  public void onViewCreated( View view, @Nullable Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
  
  
      recyclerView = (RecyclerView)view.findViewById(R.id.recyclerView_no_Top_ups);
      mdatabaseref = FirebaseDatabase.getInstance().getReference().child("Users");
      Log.d(TAG, "onViewCreated: "+mdatabaseref.getRoot());
  
      mdatabaseref.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              Log.d(TAG, "onDataChange: " + dataSnapshot);
              Log.d(TAG,dataSnapshot.getChildren().toString());
  
              list = new ArrayList&lt;ITEM&gt;();
  
                  for (DataSnapshot dataSnapshot1:dataSnapshot.getChildren()){
                      Log.d(TAG, "onDataChange: In the loop " + dataSnapshot1.toString());
  
  
                      ITEM value = dataSnapshot1.getValue(ITEM.class);
                      ITEM itemModel = new ITEM();
  
                      String Title = value.getTitle();
                      Log.d(TAG, "onDataChange:Title "+ value.getTitle());
  
  
  
                      String Description = value.getDescription();
                      String Amount = value.getAmount();
  
                      itemModel.setTitle(Title);
                      itemModel.setDescription(Description);
                      itemModel.setAmount(Amount);
  
                      list.add(itemModel);
              }
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
              Log.d(TAG, "onCancelled: Error");
  
          }
      });
  
  //        Log.d(TAG, "LIST "+ list);
  
  
      Adapter adapter = new Adapter(getContext(),list);
      recyclerView.setLayoutManager(new GridLayoutManager(getContext(),2));
      recyclerView.setAdapter(adapter);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My firebase has been set up properly cause i can send data to the Firebase Database:</p>
  
  <p>From my logcat you can see that Log.d(TAG, "onDataChange: In the loop " + dataSnapshot1.toString()); isnt being called. Even the log.d(TAG,"On data cange"+ datasnapshot) isn't being called meaning there is a problem..can someone please help me</p>