im getting error im using java code , i can write successfully but can not get location from same key .
geoFirestore.setLocation("hi", new GeoPoint(37.7853889, -122.4056973), new GeoFirestore.CompletionCallback() {
@Override
public void onComplete(@Nullable Exception e) {
if (e == null) {
Log.d("SUCCESS", "Location saved on server successfully!");
} else
Log.e("FAIL", "no write " + e.getMessage());
}
});
geoFirestore.getLocation("hi", new GeoFirestore.LocationCallback() {
@Override
public void onComplete(GeoPoint location, Exception exception) {
if (exception == null && location != null) {
Log.e("LOC", "" + String.format("The location for this document is [%f,%f]", location.getLatitude(), location.getLongitude()));
}else
Log.e("FAIL", "no write " + exception.getMessage());
}
});
im getting error im using java code , i can write successfully but can not get location from same key .
geoFirestore.setLocation("hi", new GeoPoint(37.7853889, -122.4056973), new GeoFirestore.CompletionCallback() { @Override public void onComplete(@Nullable Exception e) { if (e == null) { Log.d("SUCCESS", "Location saved on server successfully!"); } else Log.e("FAIL", "no write " + e.getMessage());