public async void RegisterToReceiveNotifications() { string notificationHubName = "[hubName]"; string connectionString = "[ConnectionString-DefaultListenSharedAccessSignature]"; // Register with WNS var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); // Register with Azure Notification Hubs NotificationHub hub = new NotificationHub(notificationHubName, connectionString); hub.Register(channel.Uri); Debug.WriteLine("ChannelURI : {0}", channel.Uri); }
public async void RegisterToReceiveNotifications() { string notificationHubName = "[hubName]"; string connectionString = "[ConnectionString-DefaultListenSharedAccessSignature]"; // Register with WNS var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); // Register with Azure Notification Hubs NotificationHub hub = new NotificationHub(notificationHubName, connectionString); hub.Register(channel.Uri); Debug.WriteLine("ChannelURI : {0}", channel.Uri); }