深入理解 Windows Phone 推送通知:从原始消息到动态磁贴与 Toast 提醒
在 Windows Phone 应用开发中,推送通知是一项强大的功能,它能让应用在无需运行的情况下向用户传递重要信息。本文将详细介绍原始通知、Toast 通知和 Live Tile 通知的相关知识,包括它们的特点、发送和接收方法,以及实际操作步骤。
1. 原始通知(Raw Notification)
原始通知是一种简单直接的通知方式,它可以在应用处于活动状态时向其发送短消息。以下是关于原始通知的详细介绍:
- 通道 URI 的特性 :关闭并重新启动应用时,通道 URI 保持不变;但重新构建应用后,通道 URI 会改变。
- 发送原始通知的代码实现 :
private void SendRaw_Click(object sender, RoutedEventArgs e)
{
// Using the URI channel input from the screen, create an HTTP request
HttpWebRequest sendNotificationRequest = (HttpWebRequest)WebRequest.Create(URI.Text);
// Set up the properties of the request
sendNotificationRequest.Method = "POST";
sendNotificationRequest.Head
超级会员免费看
订阅专栏 解锁全文
14

被折叠的 条评论
为什么被折叠?



