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, ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.