Search code examples
windows-8.1windows-8.1-universal

Receive push notification in Windows 8.1


I am developing Windows 8.1 Application and want to implement push notification using WNS.

I have updated my app to dashboard and also associated my app with app store . I followed Push and periodic notifications client-side sample.

I debugged this sample and found the channel URI (notify.....com) .I am trying to get my app channel Uri but I am not able to get any Uri .I think I am not implemented properly.

Please help me to troubleshoot this issue and share some idea for the below points.

  1. How to associate Windows 8.1 App with App Store.
  2. How to enable Push Notification Service using WNS ( any other procedure also).

  3. Local Configuration.

  4. How to get channel URI.

link


Please find the error on the below attached image.

Error


Solution

  • How to associate Windows 8.1 App with App Store.** In your store dashboard navigate to the particular app and on the left you will see a list having items like analyitcs,services etc. Click on services->Push Notification. Then click on the live service site. See Screenshotenter image description here

    Then update your solution with Name and publisher. This should set you up. and also take cares of question 2 and 3 of your post.(Associating your app from store should do this automatically once you have enabled push from dashboard)

    And to get channel URI just call the following method in your code:

    PushNotificationChannel channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
    
    var myuri = channel.Uri;