Created
November 24, 2014 17:18
-
-
Save CHLibrarian/cbc74600d574b9d41cf6 to your computer and use it in GitHub Desktop.
ContextHub Element Services Geofence Delete (Android)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final long id = 1000; | |
GeofenceProxy proxy = new GeofenceProxy(); | |
proxy.deleteGeofence(id, new Callback<Object>() { | |
@Override | |
public void onSuccess(Object result) { | |
// If you do not have push properly set up, you need to explicitly call synchronize on LocationService so it will stop generating events for this geofence | |
LocationService.getInstance().synchronize(); | |
Log.d(TAG, String.format("Successfully deleted geofence id %s", id)); | |
} | |
@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