Discovering Windows Phone 7 Device Capabilities

Version: 1.0.0

Description

All Windows Phone devices meet a common hardware specification, but some provide additional features. It is possible for an application to examine the device's capabilities in order to alter its behavior to provide the best user experience. This hands-on-lab shows you how to query a device’s capabilities for networking, hardware, and general device information such as manufacturer and firmware.

Overview

Though all Windows® Phone devices meet a minimum hardware specification, there are small differences among the devices becasuse a few go “above and beyond” the minimum specification. Also, in the Windows Phone 7 Codenamed “Mango” release, some new optional hardware components (namely gyro) have been added.

These small, yet often relevant, differences in hardware make the ability to detect hardware capabilities programmatically important for some applications.

This lab shows how to create a simple application that examines the device’s capabilities and reports them back to the user.

Objectives

This lab provides instructions to help you achieve the following:

  • Write an application that reports a Windows® Phone 7 Codenamed “Mango” device’s capabilities.
  • Familiarize yourself with the various entities you can query for information on the device.
Note:
 This lab only shows how to examine the phone’s capabilaties and status (battery, network, and such), but does not explain what do to in such situations. It is up to the application developer to understand the current circumstances and the capabilities of the device at hand and act accordingly in the application.

Prerequisites

The following prerequisites ensure that you gain the most from this hands-on lab:

Lab Structure

This lab includes a single exercise. The following tasks are contained in the exercise:

  1. Obtaining and displaying general Windows Phone information.
  2. Obtaining and displaying network information.
  3. Obtaining and displaying hardware capabilities.

Estimated completion time

Completing this lab should take between 15 to 30 minutes.