O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending a Tile Notification

Sending a tile notification is done in the same manner as sending a toast notification; the differences are in the request headers and the format of the XML message (see Listing 15.2). As with toast notifications, we create an HttpWebRequest, build the message, convert the message to a byte array, and then write it to the request Stream. Finally, we verify that the notification was correctly received by the MPNS.

An HttpRequestHeader named WindowsPhone-Target with the value tile is added to the request’s Headers collection, indicating to the MPNS that it is a tile notification.

LISTING 15.2. Sending a Tile Notification

public PushNotificationSendResult SendTileNotification(string title, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required