User:Mike8411251995/沙盒
開發者 | 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通知或動態磚的更新)傳送至支援此服務的Windows或Windows Mobile應用程式中。[1]該服務取代了原有的Microsoft推播通知服務,發行時支援的作業系統僅有Windows 8,不久後才增加Windows Phone 8.1。[2]
技術細節
[编辑]設計及相容性
[编辑]Windows推播通知服務(WNS)的設計意在取代原有的Microsoft推播通知服務(MPNS),其中後者僅在Windows Phone 8中有原生支援。軟體開發人員仍可在安裝於較新版本之Windows Mobile(Windows Phone 8或Windows Phone 8.1)上的應用程式使用舊有的MPNS,前提是該軟體已註冊MPNS且需轉換為適用於新版作業系統的Microsoft Silverlight應用程式。[3]
2015年,微軟宣布將擴展WNS的應用至通用Windows平台架構,讓推播資料可直接傳送至Windows 10、Windows 10 Mobile以及XBOX等作業系統、或是利用通用API呼叫程序及POST請求傳送至WNS支援的其它平台。[4]
在Build 2015的發表會中,微軟公布了一款通用Windows平台的橋接器,讓開發人員可將現有軟體的程式碼從Android或iOS轉換至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.0 1.1 Windows 8 push notifications. June 3, 2012 [May 28, 2016].
- ^ 2.0 2.1 Windows Push Notification Services (WNS) overview (Windows Runtime apps). Microsoft. [November 29, 2015].
- ^ (英文)Choosing MPNS or WNS for a Windows Phone Silverlight 8.1 app. Microsoft. [2015-11-04].
- ^ (英文)Gallo, Kevin. A first look at the Windows 10 universal app platform. Microsoft. 2015-03-02 [2015-11-29].
- ^ (英文)Hachman, Mark. Microsoft releases iOS-to-Windows app maker Windows Bridge to open source. PC World. IDG. 2015-08-06 [2015-10-09].
- ^ (英文)Saran, Cliff. Android for Windows Mobile tools leaked on web. Computer Weekly. 2015-08-18 [2016-05-28].
- ^ (英文)Jo Foley, Mary. Microsoft: Our Android Windows 10 bridge is dead, but iOS, Win32 ones moving ahead. ZDNet. 2016-02-25 [2016-02-26].
- ^ (英文)Ligas, Nicola. Windows 10 will support notifications from Android (ah yes, even Windows 10 Mobile). Smartworld.it. 2016-04-01 [2016-05-28].
- ^ Windows Push Notification Services (WNS) overview. Microsoft. May 4, 2016 [May 28, 2016].
- ^ Snoei, Ton. Windows Phone 8.1 Universal App Push Notifications (WNS) – Part 1. Snoei.net. [May 28, 2016].