title: How to save GeoFire coordinates along with other items in Firebase database?
body: <p>I'm developing an app and saving some strings like <code>postedAtTime</code>, <code>postedBy</code>, <code>postedOnDate</code> in Firebase database. I want to save the GeoFire coordinates in the same node in which all the above string are saved, so that later I can do query, easily.</p>
  
  <p>Here's the path to which I'm saving all the strings:</p>
  
  <pre><code>databaseReferenceHRequests = firebaseDatabase.getReferenceFromUrl("https://appName-e1a35.firebaseio.com/requests/");
  </code></pre>
  
  <p>This is how I'm saving it:</p>
  
  <pre><code>// in onButtonClicked method:
  postNewRequest(null, imageUID, MainActivity.userName.getText().toString(), time, date, utcFormatDateTime, MainActivity.userEmail.getText().toString(), geoFire);
  
  // the method:
  public void postNewRequest(Bitmap bitmap, String imageUIDh, String postedBy, String postedAtTime, String postedOnDate, String utcFormatDateTime, String userEmail, GeoFire geoFire) {
      HRequest hRequest = new HelpRequest(null, imageUIDh, postedBy, postedAtTime, postedOnDate, utcFormatDateTime, userEmail, geoFire);
      databaseReferenceHRequests.push().setValue(hRequest);
  }
  </code></pre>
  
  <p>Here's how it is getting saved in the database:</p>
  
  <p><a href="https://i.stack.imgur.com/t07Bf.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/t07Bf.jpg" alt="database structure screenshot"></a></p>
  
  <p>What I want is to save the GeoFire coordinates in the same node, which is <code>-KLIoLUsI0SpQZGpV1h4</code> here. This is just a push ID and it gets generated randomly.</p>
  
  <p>I tried it by giving this reference:</p>
  
  <pre><code>geoFire = new GeoFire(firebaseDatabase.getReferenceFromUrl("https://appName-e1a35.firebaseio.com/requests/"));
  </code></pre>
  
  <p>And then pushing it with other items as shown above. But, this saved only GeoFire coordinates and not the other items under the node <code>requests</code>.</p>
  
  <p>So, what should be my GeoFire reference so that it gets saved along with all the data in the same node?</p>
  
  <p>What is going wrong here? Please let me know.</p>