Skip to content

Instantly share code, notes, and snippets.

@Budincsevity
Last active August 29, 2015 14:21
Show Gist options
  • Save Budincsevity/ba9e22e30874f8e3cc46 to your computer and use it in GitHub Desktop.
Save Budincsevity/ba9e22e30874f8e3cc46 to your computer and use it in GitHub Desktop.
Registration with tags
//Register a new gcm ID
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);
String gcmID = gcm.register(SENDER_ID);
//New NotificationHub instance
NotificationHub hub = new NotificationHub("<hub name>", "<connection string>", context);
//Register your gcm ID with NotificationHub
NativeRegistration registration = hub.register(gcmID, "tag");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment