Created
November 12, 2012 16:41
-
-
Save ferclaverino/4060395 to your computer and use it in GitHub Desktop.
Subscribe to WNS and register the channel
This file contains hidden or 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
function subscribeToPushNotification() { | |
var channelOperation = Windows.Networking.PushNotifications | |
.PushNotificationChannelManager | |
.createPushNotificationChannelForApplicationAsync() | |
.then(function (newChannel) { | |
channel = newChannel; | |
// Insert the new channel URI into the Channel table. | |
var client = getMobileServiceClient(); | |
var channelTable = client.getTable('Channel'); | |
channelTable.insert({ uri: channel.uri }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment