title: Intergrating firebase real time database to android app
body: <p>App doesn't receive data from firebase console.</p>
  
  <p>I have set up INTERNET permission in the manifest file.
  I have also have one listview in my layout file.
  Firebase assistant also shows my app is connected to Firebase,dependencies set up correctly </p>
  
  <p>Here's my java class:</p>
  
  <pre><code>public class Todaytips extends Activity implements ValueEventListener {
      DatabaseReference dref;
      ListView listView;
      ArrayList&lt;String&gt; list=new ArrayList&lt;&gt;();
      ArrayAdapter&lt;String&gt; adapter;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.todaytips);
          listView=(ListView)findViewById(R.id.listview);
          adapter=new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_dropdown_item_1line,list);
          dref= FirebaseDatabase.getInstance().getReference();
          dref.addChildEventListener(new ChildEventListener() {
              @Override
              public void onChildAdded(DataSnapshot dataSnapshot, String s) {
               String value= dataSnapshot.getValue(String.class);
                  list.add(value);
                  adapter.notifyDataSetChanged();
              }
  
              @Override
              public void onChildChanged(DataSnapshot dataSnapshot, String s) {
  
              }
  
              @Override
              public void onChildRemoved(DataSnapshot dataSnapshot) {
  
              }
  
              @Override
              public void onChildMoved(DataSnapshot dataSnapshot, String s) {
  
                  String value= dataSnapshot.getValue(String.class);
                  list.remove(value);
                  adapter.notifyDataSetChanged();
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
      }
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_activity_one, menu);
          return true;
      }
  
  
      @Override
      public void onDataChange(DataSnapshot dataSnapshot) {
  
      }
  
      @Override
      public void onCancelled(DatabaseError databaseError) {
  
      }
  
  }
  </code></pre>