I have inserted location using geofire in firebase from one of the activity in android studio now I want to retrieve all the location in single google map activity with marker. I have created map activity, but I don't know how to retrieve the location from the firebase .
Please help I am stuck in this. With some source code.
Here is my code for sending location to firebase
GeoFire geoFire = new
GeoFire(databaseReference.child("Location").child(user.getUid()));
geoFire.setLocation("location", new
GeoLocation(location.getLatitude(), location.getLongitude()), new
GeoFire.CompletionListener() {
@Override
public void onComplete(String key, DatabaseError error) {
if (error != null) {
Toast.makeText(gpdfuel.this, "There was an error
saving the location to GeoFire: " + error, Toast.LENGTH_LONG).show();
} else {
Toast.makeText(gpdfuel.this, "Location saved on server
successfully!", Toast.LENGTH_LONG).show();
}
}
});