The aim of my application is to retrieve all users current location from real-time firebase and show it on the map in Android Studio. The location of the user is set by using GeoFire and stored in the real-time firebase. The code of setting GeoFire is as follow:
private void settingGeoFire() {
String firebaseAuth = FirebaseAuth.getInstance().getUid();
myLocationRef = FirebaseDatabase.getInstance().getReference("UserLocation/"+firebaseAuth);
geoFire = new GeoFire(myLocationRef);
}
and the structure of the real-time firebase is as follow:
The question is how to retrieve all user's latitude and longitude which are stored under the file 0 and 1 (refer to the image above) in real-time firebase and show them as multiple markers on the map in android studio? Thanks if you can help!