简体   繁体   English

是否可以在使用 Xaml Islands 的 WPF 应用程序中接收来自 WNS 的推送通知?

[英]Is it possible to receive push notifications from WNS in a WPF app, which uses Xaml Islands?

I'm creating an app in WPF and using Xaml Islands to add UWP look and feel to it.我正在 WPF 中创建一个应用程序,并使用 Xaml Islands 为其添加 UWP 外观。

I'd like to receive push notifications from Amazon SNS, using the Windows Push Notification Services (WNS).我想使用 Windows 推送通知服务 (WNS) 从 Amazon SNS 接收推送通知。 Following this article to create a notification channel, I tried to run the this code:按照本文创建通知渠道,我尝试运行此代码:

await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

But it failed with the following very verbose exception: Element not found. (0x80070490)但它因以下非常详细的异常而失败: Element not found. (0x80070490) Element not found. (0x80070490) . Element not found. (0x80070490) I tried also to run it in a custom UWP component, but the result was the same.我也尝试在自定义 UWP 组件中运行它,但结果是一样的。

So, my question is that, is it possible to receive push notifications from WNS with this kind of app type?所以,我的问题是,是否可以使用此类应用程序从 WNS 接收推送通知?

After days of investigation and searching, I found that the answer is: yes.经过几天的调查和寻找,我发现答案是:是的。 The very simple thing what should be done, is just to run the Desktop Bridge project inside the solution, not the WPF app, how I tried to do.应该做的事情非常简单,就是在解决方案中运行 Desktop Bridge 项目,而不是WPF应用程序,这是我尝试做的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 XAML Islands 在 WPF 应用程序中托管标准 UWP 控件 - Host a standard UWP control in a WPF app using XAML Islands UWP MapControl inW WPF 应用程序使用 XAML 岛 - UWP MapControl inW WPF app using XAML Islands XAML页面(WPF应用程序)是否可以包含在dll中? - Is it possible for XAML Pages (WPF App) be included in a dll? 如何在 WPF 和 XAML 群岛中使用 Windows 10 样式资源 - How to use Windows 10 style resource in WPF with XAML Islands 如何在 XAML 岛的 WPF 中使用正确的 WindowsRuntime.dll? - How to use the correct WindowsRuntime.dll in WPF for XAML Islands? WPF:是否可以从XAML调用函数 - WPF: is it possible to call function from XAML 可以通过wcf / webservice从wpf应用程序向网站发送信息并接收响应 - Is is possible to send information and receive a response through wcf/webservice to a website from a wpf app 如果 .NET Core 是目标平台,我可以在 WPF 中使用 XAML 岛吗? - I can use XAML Islands in WPF just if the .NET Core is the target platform? Windows 10 的真正最低支持版本是什么,用于在使用 Z8CBFD56512569C43ZDEDB 的 WPF 应用程序中托管 UWP 控件? - What is the true minimum supported version of Windows 10 for hosting UWP controls in a WPF application using XAML Islands? 是否可以从WPF网格中的XAML恢复对象网格位置? - It is possible to revive an objects grid position from an xaml in wpf grid?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM