Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CHLibrarian/6f4d2202cd9efec1eec2 to your computer and use it in GitHub Desktop.
Save CHLibrarian/6f4d2202cd9efec1eec2 to your computer and use it in GitHub Desktop.
ContextHub Element Services Geofence Retrieve Tags (Android)
// Getting the first 10 geofences with the tag "geofence-tag" near our location in 2000 meter radius
GeofenceProxy proxy = new GeofenceProxy();
proxy.listGeofences(29.763638f, -95.461874f, 2000, 10, new String[]{"geofence-tag"},
new Callback<List<Geofence>> {
@Override
public void onSuccess(List<Geofence> result) {
for(Geofence geofence : result) {
Log.d(TAG, geofence.toString());
}
}
@Override
public void onFailure(Exception e) {
Log.d(TAG, e.getMessage());
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment