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

6

Interacting with the Hardware

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • What's different about mobile development
  • Responding to changes in device orientation
  • Using the built-in Back button
  • Communicating with users through vibration
  • Using the FM radio
  • Using the accelerometer sensor

One of the most exciting things about writing applications for mobile devices is that their capabilities can be vastly different from more “traditional” platforms. Mobile devices fit in the palm of your hand, and you can move them around, shake them, and interact with them in other unusual ways. If you tried to do that with a desktop PC, you'd probably only succeed in breaking something or injuring yourself.

In this chapter, you'll learn about the differences in capabilities between mobile devices and desktop PCs and how to write code that takes these differences into account. You also learn about the difficulties inherent in developing with an emulator that doesn't always give you access to these capabilities.

Specifically, after you've learned about the differences in capabilities, you'll look at how to determine the orientation of a device and ensure that your applications respond to orientation changes. This helps you ensure that your applications look good and function well, regardless of how users hold their devices — and it even allows you to introduce additional functionality.

Next, you look at the Back button. This button, along with the Search button, must be present on all devices that run Windows ...

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