I am developing a windows phone 8.1 App (RT), I am trying to push notification with Azure Notification Hub. I am able to do it with the client side SDK available. But I want to do the device registration, tagging etc. from the server side. I see a good guide for .Net backend at http://blogs.msdn.com/b/azuremobile/archive/2014/04/08/push-notifications-using-notification-hub-and-net-backend.aspx . I am using NodeJS in the backend server side. Can anyone help me in the same, with a sample code or so.
- I want to register devices from server side (iPhone, Android & Windows Phone), actually I have the device tokens available at the servicer side which is sent from the device via API call.
- I want to update multiple tags for each devices time to time.
- I want to unregister the devices when user request to do so.
- I want to send push notification to specific tags, using the template.
Look at open source SDK for server side. I've never tried it out, but should be OK because any SDK is just a wrapper for REST API.
The steps to register the device token and sending out the notification using the Notification Hub in node.js are as follows:
This is server side code, once the device token is received. Note that the registration ID, Device Token, Tag and Callback function are required parameters for notificationHubService.apns.send call.
Here is the code snippet: