Notification Hubs
Windows Store Application (WNS)
- You must pay a fee of 19USD to develop Windows Store applications
- You can make the
Notification Hub
interact with the Application in the Windows Store
- Requires Nuget package
WindowsAzure.Messaging.Managed
private async void InitNotificationsAsync()
{
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
var hub = new NotificationHub("apphub", "connection-string");
var result = await hub.RegisterNativeAsync(channel.Uri);
// Displays the registration ID so you know it was successful
if (result.RegistrationId != null)
{
var dialog = new MessageDialog("Registration successful: " + result.RegistrationId);
dialog.Commands.Add(new UICommand("OK"));
await dialog.ShowAsync();
}
}