Chapter 6. Working with the camera

 

This chapter covers

  • Working with the photo and camera choosers
  • Taking pictures with the camera hardware
  • Editing pictures
  • Saving pictures to isolated storage

You’re reading this book because you want to build mobile applications. In order to build a useful mobile application, you need to understand how most mobile users use their phones. Are they only using their phone for talking and sending text messages? No. A lot of mobile users are using more than just a phone. They use their device for listening to music or the radio, watching videos, and taking photos. As mobile developers, we need to know how to integrate multimedia in our applications, allowing users to do what they want to do in better and more efficient ways. In this chapter you’re going to learn how to use the camera to capture photographs and include them in your application.

In this chapter you learn how to integrate the phone camera into your application. You may remember that we skipped the PhotoChooserTask and Camera-CaptureTask in chapter 4, when we covered the other launchers and choosers. Both of these tasks are related to the camera and we’re going to explain them in detail in this chapter. The PhotoChooserTask allows your application to prompt the user to pick a picture from the Pictures Hub to load into the application. The Camera-CaptureTask allows your application to use the built-in camera application to take a picture for use in your application.

6.1. Starting the PhotoEditor project

6.2. Working with the camera tasks

6.3. Controlling the camera

6.4. Image editing

6.5. Summary