Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

NotificationHub.js : registration template issue #28

Open
biapar opened this issue Jan 13, 2015 · 0 comments
Open

NotificationHub.js : registration template issue #28

biapar opened this issue Jan 13, 2015 · 0 comments

Comments

@biapar
Copy link

biapar commented Jan 13, 2015

Hi, I'm building notification functions on my AngularJS app with Ionic. I see a strange thing.
If I use the template registration to Notifiction Hub , like your code, I'm not able to receive notifications. I'm always registered on hub and GCM.

// Create the integrated Notification Hub client.
var hub = new NotificationHub(mobileClient);

// Template registration.
var template = "{ "data" : {"message":"$(message)"}}";
//Register for notifications.
// (gcmRegId, ["tag1","tag2"], templateName, templateBody)
hub.gcm.register(e.regid, null, "myTemplate", template).done(function () {

Instead, to receive the notifications, I need to remove template and call: hub.gcm.register(e.regid).done(function () {

Why?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant