Created
November 24, 2014 20:06
-
-
Save CHLibrarian/872f303ba35b44f57356 to your computer and use it in GitHub Desktop.
ContextHub Element Services Subscription Remove (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
// Unsubscribing from tag "my-tag-2" | |
// We want to unsubscribe from tag "my-tag-2", so we specify the REMOVE operation and the tag to remove. | |
SubscriptionProxy proxy = new SubscriptionProxy(); | |
List<String> tagList = Arrays.asList("my-tag-2"); | |
List<String> subscriptionTypes = Arrays.asList("beacon", "geofence", "vault"); | |
proxy.updateSubscriptions(SubscriptionOperation.REMOVE, tagList, subscriptionTypes, new Callback<SubscriptionResponse>() { | |
@Override | |
public void onSuccess(SubscriptionResponse result) { | |
Toast.makeText(getActivity(), ("Beacon, geofence, and vault subscriptions removed", Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public void onFailure(Exception e) { | |
Toast.makeText(getActivity(), ("Error removing beacon, geofence, and vault subscriptions", Toast.LENGTH_SHORT).show(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment