NotificationHub在注册标记UWP发送通知 [英] NotificationHub send notification in registered tag UWP

查看:127
本文介绍了NotificationHub在注册标记UWP发送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法通过NotificationHub发送与UWP应用的通知?在很多教程,他们将通知发送使用Microsoft.Azure.NotificationHubs的NuGet包一个C#控制台应用程序。我不能在UWP应用程式安装该软件包。
我可以专门发出通知,我与RegisterNativeAsync注册标记设备?

Is there a way to send a notification with UWP app through NotificationHub? In many tutorials they send notifications with a C# console application using Microsoft.Azure.NotificationHubs Nuget package. I cannot install this package in a UWP app. Can i specifically send a notification to a tagged device that i register with RegisterNativeAsync?

推荐答案

我终于找到了解决办法。在code是像@Kyle,但我不得不添加

I finally found the solution. The code is like @Kyle but i had to add

request.Headers.Add("X-WNS-Type", "wns/toast");

为了发送推送通知

in order to send a push notification

中号矿石详细信息

这篇关于NotificationHub在注册标记UWP发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆