private void requestPickupHere(String uid) {
DatabaseReference dbRequest = FirebaseDatabase.getInstance().getReference("PickupRequest");
GeoFire mGeoFire = new GeoFire(dbRequest);
mGeoFire.setLocation(uid,new GeoLocation(mLastLocation.getLatitude(),mLastLocation.getLongitude()));
if (mUserMarker.isVisible())
mUserMarker.remove();
//Add new marker
mUserMarker = mMap.addMarker(new MarkerOptions()
.title("Pickup Here")
.snippet("")
.position(new LatLng(mLastLocation.getLatitude(),mLastLocation.getLongitude()))
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));
mUserMarker.showInfoWindow();
btnPickupRequest.setText("Getting your Driver ....");
}
Хочу добавить здесь список завершения, но я не знаю, где добавить эти строки кода, приведенные ниже
Попробуйте добавить CompletionListener, например
geoFire.setLocation(userId, new GeoLocation(location.getLatitude(), location.getLongitude()), new GeoFire.CompletionListener() {@override
public void onComplete(String key, DatabaseError error) { }
не знаю, где добавить эти строки, пожалуйста, помогите