title: Retrieving data from Firebase Android Studio
body: <p>Structure of my Firebase Datebase looks like that:</p>
  
  <p><a href="https://i.stack.imgur.com/6Zc81.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Zc81.png" alt="enter image description here"></a></p>
  
  <p>I want to retrieve data from it in such a manner that when I change the value of the "Name" in database it will instantly change in Android Studio. Right now, I use <code>.addChildEventListner</code> method combined with <code>Map&lt;String, String&gt;</code>. Could someone help me ?</p>
  
  <p>Edit: My code:</p>
  
  <pre><code>   Firebase markerRef = myFirebaseRef.child("marker");
  
      markerRef.addChildEventListener(new ChildEventListener() {
          @Override
          public void onChildAdded(com.firebase.client.DataSnapshot dataSnapshot, String s) {
              Map&lt;String, String&gt; map = dataSnapshot.getValue(Map.class);
              double latitude = Double.parseDouble(map.get("Lat"));
              double longitude = Double.parseDouble(map.get("Lon"));
              LatLng location = new LatLng(latitude, longitude);
  
              String filename = map.get("Name");
              String[] splitString = filename.split(",");
  
  
              mMap.addMarker(new MarkerOptions()
                      .position(location)
                      .title(splitString[0])
                      .snippet(splitString[1])
                      .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));
          }
  
          @Override
          public void onChildChanged(com.firebase.client.DataSnapshot dataSnapshot, String s) {
  
  
          }
  
          @Override
          public void onChildRemoved(com.firebase.client.DataSnapshot dataSnapshot) {
  
          }
  
          @Override
          public void onChildMoved(com.firebase.client.DataSnapshot dataSnapshot, String s) {
  
          }
  
          @Override
          public void onCancelled(FirebaseError firebaseError) {
  
          }
      });
  </code></pre>