Skip to content

Instantly share code, notes, and snippets.

@Budincsevity
Created May 16, 2015 15:54
Show Gist options
  • Save Budincsevity/97043bab2d95c446ced6 to your computer and use it in GitHub Desktop.
Save Budincsevity/97043bab2d95c446ced6 to your computer and use it in GitHub Desktop.
Notification Hub registration
//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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment