Weather Service Push notifications
The Microsoft Push Notification Service in Windows Phone offers third-party developers a resilient, dedicated, and persistent channel to send information and updates to a mobile application from a web service. This hands-on-lab will show you how to build an end-to-end push notification service, including subscribing to push on your phone and building the server-side code to send push notifications to the phone.
The Microsoft Push Notification Service in Windows® Phone offers third party developers a resilient, dedicated, and persistent channel to send information and updates to a Windows® Phone application from their web sites (web services).
In the past, a mobile application would need to frequently poll its corresponding web service to know if there are any pending notifications. While effective, polling results in the device radio being frequently turned on, impacting battery life in a negative way. By using push notifications instead of polling, a web service can notify an application of important updates on an as-needed basis.
When a web service has information to send to an application, it sends a push notification to the Push Notification Service, which in turn routes the push notification to the application. Depending on the format of the push notification and the payload attached to it, the information is delivered as raw data to the application, the application's tile is visually updated, or a toast notification is displayed. The application can then contact the web service using its own protocol, if needed.
The Push Notification Service sends a response code to your web service after a push notification is sent. However, the Push Notification Service does not provide an end-to-end confirmation that your push notification was delivered from your web service to your application. For more information, see Push Notification Service Response Codes for Windows® Phone.
This lab covers push notifications and also introduces the usage of http services in Silverlight. During this lab you will create server side logic needed to send messages through the Push Notification Service. You will create a simple Windows® Phone 7 Codenamed Mango application which serves as a client to receive said notifications. The client application will receive weather updates. The server side business application (a simple WPF application) will send weather alerts to registered client applications through Push Notification Services. Once a client Windows® Phone 7 application receives such alert it will display the information received.
Note: The server side Weather application uses the WindowsPhone.Recipes.Push.Messasges.dll which encapsulates all the logic and functionality for sending and receiving responses from Microsoft Push Notification Services. For more information, see http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/01/14/windows-push-notification-server-side-helper-library.aspx.
During the course of this lab you will:
The following is required to complete this hands-on lab:
This hands-on lab comprises of the following exercises:
Estimated time to complete this lab: 110 minutes.