title: Android Firebase Database : Single data fetch without event listener
body: <p>Right now, following is my database hierarchy in Firebase Database console.</p>
  
  <p><a href="https://i.stack.imgur.com/1Nx86.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Nx86.png" alt="enter image description here"></a> </p>
  
  <p>I am using following code to enter data into firebase database.</p>
  
  <pre><code>public void createRecordInDB(PlaceListItem placeListItem)
      {
          mDB= FirebaseDatabase.getInstance().getReference();
          mListItemRef = mDB.child("Places");
  
          for(int i = 0; i &lt; placeListItem.getResults().size(); i++) {
              // Create new List Item  at /listItem
              String placeId = placeListItem.getResults().get(i).getPlaceId().toString();
              String key = placeId;
              PlaceDBModel placeDBModel = new PlaceDBModel();
              placeDBModel.setPlaceName(placeListItem.getResults().get(i).getName());
              placeDBModel.setVicinity(placeListItem.getResults().get(i).getVicinity());
              placeDBModel.setLattitude(placeListItem.getResults().get(i).getGeometry().getLocation().getLat().toString());
              placeDBModel.setLongitude(placeListItem.getResults().get(i).getGeometry().getLocation().getLng().toString());
              placeDBModel.setPlaceID(placeId);
              if(isItWorking(key))
                  placeDBModel.setWorkingOrNot("Working");
              else
                  placeDBModel.setWorkingOrNot("Not Working");
              HashMap&lt;String, Object&gt; result = new HashMap&lt;&gt;();
              result.put(key, placeDBModel);
              mListItemRef.updateChildren(result);
  
          }
  </code></pre>
  
  <p>See when I load data from web service first time, I simply enter all data into firebase database. Now in one screen of my app(a button click), I can update some data in particular node. Now when I again back to previous screen and it loads data from web API, it overwrites all data into firebase database. I need to remain changed values as it was at the time of button click. So I want to read that particular data in node, if it is Working then set value "Working" else "Not Working". I hope this will clarify my query.</p>