Last active
August 29, 2015 14:09
-
-
Save CHLibrarian/1e8dd4ab3ee20885821d to your computer and use it in GitHub Desktop.
ContextHub Event Services Remove Subscription (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
// Unsubscribe from "office-chaione" tag to stop receiving events from beacon and geofence elements for that tag | |
List<String> tags = new ArrayList<String>("office-chaione"); | |
List<String> subscriptionTypes = Arrays.asList("beacon", "geofence"); | |
SubscriptionProxy proxy = new SubscriptionProxy(); | |
proxy.updateSubscriptions(SubscriptionOperation.REMOVE, tags, subscriptionTypes, new Callback<SubscriptionResponse>() { | |
@Override | |
public void onSuccess(SubscriptionResponse result) { | |
Toast.makeText(getActivity(), "Beacon and geofence subscriptions removed", Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public void onFailure(Exception e) { | |
Toast.makeText(getActivity(), "Error removing beacon and geofence subscriptions", Toast.LENGTH_SHORT).show(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment