How to delete a Geolocation by objectId (for Android)?


Im saving a GeoPoint async. And in the callback method i can get the objectId. Can i delete this object by id, and not by LatLng? Im using Android.
And another question, should i save and relate regular objects if i only use latitude and longitude, or i can just use the Geolocation option?

Hi Gidi,

This link can be useful for you
You can use method

removePoint(GeoPoint geoPoint, AsyncCallback<Void> responder)

ObjectId will be retrieved from GeoPoint and this object will be deleted from your app.



Thnx, saw that, but my question was can i delete it by objectId, and not by Geopoint. Is there a remove method, that gets objectId?

As alternative you can create new GeoPoint, set it the objectId and use it for removing.

Code would look like this:

String objectId = "GeoPointObjectId";
GeoPoint point = new GeoPoint();
point.setObjectId( objectId );
Backendless.Geo.removePoint( point );