node.js - Requesting a New Registration Id and Creating a Tag for the Azure Notification Hub with NodeJs -


how new registration id azure notification hub javascript (nodejs) , how create tag afterwards? tutorial provided azure documentation misses part - sends devices (null).

https://azure.microsoft.com/en-us/documentation/articles/notification-hubs-nodejs-how-to-use-notification-hubs/

  var payload={     alert: 'hello!'   };   notificationhubservice.apns.send(null, payload, function(error){     if(!error){     // notification sent     }   }); 

thanks!

the notification hub apns object has createnativeregistration(token, tags, options, callback) function.

var token='abcd1234......'; // token ios device var tags = ['mynewtag', 'myoldtag']; notificationhubservice.apns.createnativeregistration(token, tags, {success:newregistrationcompletecallback, error:newregistrationerrorcallback}); 

if using npm can read source it since documentation pretty incomplete.

if using mobile services' node.js backend, see documentation built-in push apns object, seems using same library.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -