Is it possible to receive push notifications from WNS in a WPF app, which uses Xaml Islands? #4527
-
I'm creating an app in WPF and using Xaml Islands to add UWP look and feel to it. I'd like to receive push notifications from Amazon SNS, using the Windows Push Notification Services (WNS). Following this article to create a notification channel, I tried to run the this code:
But it failed with the following very verbose exception: So, my question is that, is it possible to receive push notifications from WNS with this kind of app type? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
FYI @andrewleader, any ideas? |
Beta Was this translation helpful? Give feedback.
-
Hi @atiyka! I believe it's possible to use WNS push notifications in a WPF app if the WPF app is packaged with MSIX. I'm not super familiar with XAML Islands, however from what I know, I thought you have to use MSIX to also use XAML Islands, but maybe I'm wrong. Either way, your first step would be to add the MSIX packaging project to your solution (or if you don't mind waiting, the Windows App SDK folks are working on adding push notifications for apps that don't use MSIX). After you've checked you're packaging your app with MSIX, you should also make sure you're deploying and launching the MSIX version of your app, so that it's running with a package identity. After that point, creating a channel should be the same as the UWP docs. If you're already using MSIX and it's still not working, let me know. I used to work in this space a couple years ago but I've moved onto a different project, but if it's still not working I can help connect you with the current person at MS that works on this! |
Beta Was this translation helpful? Give feedback.
Hi @atiyka!
I believe it's possible to use WNS push notifications in a WPF app if the WPF app is packaged with MSIX. I'm not super familiar with XAML Islands, however from what I know, I thought you have to use MSIX to also use XAML Islands, but maybe I'm wrong. Either way, your first step would be to add the MSIX packaging project to your solution (or if you don't mind waiting, the Windows App SDK folks are working on adding push notifications for apps that don't use MSIX).
After you've checked you're packaging your app with MSIX, you should also make sure you're deploying and launching the MSIX version of your app, so that it's running with a package identity. After that point, creating…