Chapter 14. Take a Picture; It'll Last Longer!
WHAT'S IN THIS CHAPTER?
Understanding the concept of Launchers and Choosers
Using your device's camera and photo features
Creating and sending an SMS text message with SMSComposeTask
Creating and sending an e-mail with EmailComposeTask
Capturing and using photos with CameraCaptureTask and PhotoChooserTask
Using MediaPlayerLauncher to play music from the user's collection
Windows Phone 7 offers a variety of Launchers and Choosers to expose basic phone functionality, such as the Camera Capture and Photo Chooser tasks, as well as the SMS Compose and Email Compose tasks and the Email Address Chooser.
In this chapter, you will learn about the various Launchers and Choosers, how they work, and how to implement them in your apps and games.
LAUNCHERS AND CHOOSERS
Launchers and Choosers are used by Windows Phone games and applications to enable common tasks such as taking a picture, sending a text or e-mail message, and even making a phone call. The Microsoft.Phone.Tasks
namespace contains all the Launchers and Choosers for Windows Phone 7. Choosers return some form of data to the calling program, and Launchers do not. Table 14-1 shows some common Launchers and Choosers.
Table 14.1. Common Launchers and Choosers
TASK CATEGORY | CLASS | DESCRIPTION |
---|---|---|
Camera |
| This allows you to take a picture with the phone camera. |
| This allows you to select a picture already taken. | |
Contacts |
| This allows you to select a phone number ... |
Get Professional Windows® Phone 7 Game Development: Creating Games using XNA Game Studio 4 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.