Chapter 13. Connectivity and the Web

WHAT'S IN THIS CHAPTER

  • Determining whether there is a network connection available

  • Displaying content with the WebBrowser control

  • Authenticating using Live ID

Although one of the Red Threads discussed in Chapter 3 was that users should feel connected, it is very common for a phone to find itself disconnected from the Internet. Whether the disconnection is for a short or an extended period, whether it was because the user stepped into an elevator or is roaming overseas, the effect is that your application will no longer be connected to services that are not running on the device itself.

This chapter will show how you can detect when the Windows Phone is disconnected and how you can integrate that knowledge into the behavior of your application. You will also see how easy it is to integrate Web content within your application using the WebBrowser control and how this can then be used to leverage third-party authentication services such as Windows Live ID.

CONNECTED STATUS

A common mistake made by developers new to building mobile applications is to make assumptions about the connectivity of the device. While it is not uncommon for mobile phones to have a data plan, the cost of such plans can still be prohibitive, resulting in users disabling their data connection or using it sparingly. In addition, there are still a large number of places where connectivity is a challenge. These may be elevators, tunnels, planes, or just remote areas that only have voice ...

Get Professional Windows® Phone 7 Application Development: Building Applications and Games Using Visual Studio, Silverlight®, and XNA® 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.