用戶: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]. 
編輯