O'Reilly logo

Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® by Robert Fonseca-Ensor, Karli Watson, Nick Lecrenski

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

CHAPTER 10 EXERCISE SOLUTIONS

Exercise 1 Solution

Answers a, b, and e participate in push notifications. You can argue that answer c possibly would, if you wrote an application to maintain channel URIs and provide a user interface for sending notifications to devices. Answer d is much more unlikely, though, unless the only Windows Phone 7 device you have access to belongs to your local mail carrier.

Exercise 2 Solution

Raw notifications are received only by applications that are currently running. If an application isn't running, notification messages are discarded.

Exercise 3 Solution

Binding to toast notifications (and indeed to tile notifications) is necessary because it instructs the push client on your device to listen for notifications. If you don't bind these notifications, they won't be received.

Exercise 4 Solution

When you call BindToShellTile(), you have the option of passing a list of domains from which tile image URIs will be accepted. If you don't supply such a list, you'll only be able to set the tile image to a resource that's local to the application.

Exercise 5 Solution

If a device is switched off, you'll receive the HTTP response header X-DeviceConnectionStatus with a value of TempDisconnected. If you also receive an X-NotificationStatus header value or Received, then the message is queued and will be delivered later when the device is switched on. Otherwise, you can try to send the message later.

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