用户:Mike8411251995/沙盒

Windows推播通知服务
Diagram showing the overview of the Windows Push Notification Service architecture
Overview of the WNS architecture.
开发者Microsoft
目标平台Windows Phone 8.1, Windows 8, Windows 8.1, Windows 10, Windows 10 Mobile
编程语言C#
开发状态Active
许可协议Closed-source

Windows推播通知服务(常见别称为Windows通知服务WNS)是一项由微软开发、适用于Microsoft Windows以及Microsoft Windows Mobile等平台的服务。其主要功能在于让软件开发人员可将推播资料(包含Toast通知英语Toast (computing)动态砖的更新)传送至支援此服务的Windows或Windows Mobile应用程序中。[1]该服务取代了原有的Microsoft推播通知服务英语Microsoft Push Notification Service,发行时支援的操作系统仅有Windows 8,不久后才增加Windows Phone 8.1[2]

技术细节

编辑

设计及相容性

编辑

Windows推播通知服务(WNS)的设计意在取代原有的Microsoft推播通知服务(MPNS),其中后者仅在Windows Phone 8中有原生支援。软件开发人员仍可在安装于较新版本之Windows MobileWindows Phone 8Windows Phone 8.1)上的应用程序使用旧有的MPNS,前提是该软件已注册MPNS且需转换为适用于新版操作系统的Microsoft Silverlight应用程序。[3]

2015年,微软宣布将扩展WNS的应用至通用Windows平台架构,让推播资料可直接传送至Windows 10Windows 10 Mobile以及XBOX等操作系统、或是利用通用API呼叫程序及POST请求传送至WNS支援的其它平台。[4]

Build 2015的发表会中,微软公布了一款通用Windows平台的桥接器,让开发人员可将现有软件的程式码从AndroidiOS转换至Windows 10 Mobile并于Windows Store中发行。[5]2015年8月,有报导指出微软的Android桥接器工具集及其相关文件已被泄漏至互联网且可供下载[6];遭泄漏版本的工具集要求开发人员注册并使用WNS以将通知资料传送至应用程序中,且不允许Google云端通讯的使用。后来,微软终止了Android桥接器的相关计划,并将资源继续集中于iOS桥接器的支援。[7]

Build 2016的发表会中,微软宣布了WNS以及Windows 10操作系统的一项更新:运行Android和iOS的装置可将已收到的推播通知转送至Windows 10中,并供使用者检视或删除。[8]

Architecture

编辑

The architecture of the Windows Push Notification Service is similar to that of its predecessor, in that it consists of servers and interfaces that generate, maintain, store, and authenticate unique identifiers (called Channel URI Identifiers) for all devices that register to use the service.[2] When a device enrolls to receive data and notification information using the WNS, it first sends a device registration request to WNS network. The WNS network acknowledges the request, and responds with the device's unique Channel URI Identifier.[9] Typically, the device will then send its identifier to a server owned by the developer so that it can be stored and used for sending notifications.[1] When the app developer wishes to transmit a notification or other WNS data to the device, it will transmit a POST request to the WNS network.[10] The network will acknowledge and authenticate the request. If the authentication succeeds, the data to be transmitted is enqueued and then sent to the device from the WNS network using the Channel URI Identifier.

References

编辑
  1. ^ 1.0 1.1 Windows 8 push notifications. June 3, 2012 [May 28, 2016]. 
  2. ^ 2.0 2.1 Windows Push Notification Services (WNS) overview (Windows Runtime apps). Microsoft. [November 29, 2015]. 
  3. ^ (英文)Choosing MPNS or WNS for a Windows Phone Silverlight 8.1 app. Microsoft. [2015-11-04]. 
  4. ^ (英文)Gallo, Kevin. A first look at the Windows 10 universal app platform. Microsoft. 2015-03-02 [2015-11-29]. 
  5. ^ (英文)Hachman, Mark. Microsoft releases iOS-to-Windows app maker Windows Bridge to open source. PC World. IDG. 2015-08-06 [2015-10-09]. 
  6. ^ (英文)Saran, Cliff. Android for Windows Mobile tools leaked on web. Computer Weekly. 2015-08-18 [2016-05-28]. 
  7. ^ (英文)Jo Foley, Mary. Microsoft: Our Android Windows 10 bridge is dead, but iOS, Win32 ones moving ahead. ZDNet. 2016-02-25 [2016-02-26]. 
  8. ^ (英文)Ligas, Nicola. Windows 10 will support notifications from Android (ah yes, even Windows 10 Mobile). Smartworld.it. 2016-04-01 [2016-05-28]. 
  9. ^ Windows Push Notification Services (WNS) overview. Microsoft. May 4, 2016 [May 28, 2016]. 
  10. ^ Snoei, Ton. Windows Phone 8.1 Universal App Push Notifications (WNS) – Part 1. Snoei.net. [May 28, 2016]. 
编辑