Last active
August 29, 2015 14:21
-
-
Save Budincsevity/0aba1287360b934a11f9 to your computer and use it in GitHub Desktop.
Registration with templates
This file contains 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
//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); | |
String template = "{ \"data\" : {\"msg\":\"$(message)\"}}"; | |
//Register your gcm ID with NotificationHub | |
NativeRegistration registration = hub.registerTemplate(gcmID, "Template1", template, tag); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment