Overview of Push Notifications Support on Windows Phone


Today's world is all about instant updates. Users check their mobile gadgets the minute they vibrate indicating a new mail, instant message, or Facebook update. To support such scenarios, Microsoft offers the Microsoft Push Notification Service, which provides a reliable method to send data to your Windows Phone device.

For an application to be push-enabled, applications need to have a push client service running, which talks with the Microsoft Push Notification Service and gets a notification URI. The application is supposed to send the URI to the service (Facebook, Hotmail, Exchange, etc.) from which you want to receive notifications. Whenever the service (Facebook, Hotmail, Exchange, etc.) wants to send information to its registered listeners (e.g. Windows Phone device), it uses the URI mentioned earlier to send a push notification to the Microsoft Push Notification Service, which then forwards the information to the Windows Phone device.

There are three different ways in which the push notification can be delivered to a Windows Phone application.

  1. Toast notification - a toast notification will be displayed.
  2. Tile notification- the application's tile is updated
  3. Raw notification

Developers should note that there is a caveat with the Microsoft Push Notification service in that there is no confirmation that the push notification was successfully delivered from the web service to the device.

While using push notifications, developers should remember that there is a limitation of one push notification channel per application and 30 channels per device. If this limitation is exceeded, an InvalidOperationException of type PushNotificationChannelQuotaExceeded will the thrown.

The Push notifications can have a maximum size of 1KB for the header and 3KB for the payload.

A Toast notification consists of the Title and content. In a push toast notification, a small icon of the application is shown next to the left of the "Title text".

A raw notification is simply ignored if the application is not currently running. The Microsoft Push Notification service will not even deliver the notification if the application is not running.

To receive push notifications, a Windows Phone application must open a push channel if one does not exist. The application must then register for the ChannelUriUpdated event.

If raw notifications are to be processed, the application needs to register for the HttpNotificationReceived event.

Every time the application starts, make sure to pass the URI to the web service. Additionally, it is recommended to pass the DeviceID also, so that the web service knows which URI was registered from which device.

The application can close the notifications channel by using the Close method.

Using the Push Notification service can result in errors and exceptions. Make sure you handle those in your application. Errors are returned to the application via the ErrorOccurred event handler and InvalidOperationException on the HttpNotificiationChannel object.


In this article, we learned about push notification support on Windows Phone. In an upcoming article, we will learn how we can implement receiving a push service notification in a Windows Phone application.

About the Author

Vipul Vipul Patel

Vipul Patel is a Software Engineer currently working at Microsoft Corporation, working in the Office Communications Group and has worked in the .NET team earlier in the Base Class libraries and the Debugging and Profiling team. He can be reached at vipul_d_patel@hotmail.com

Related Articles


  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: May 7, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT This eSeminar will explore three popular games engines and how they empower developers to create exciting, graphically rich, and high-performance games for Android® on Intel® Architecture. Join us for a deep dive as experts describe the features, tools, and common challenges using Marmalade, App Game Kit, and Havok game engines, as well as a discussion of the pros and cons of each engine and how they fit into your development …

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds