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).
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
Post a Comment