Chapter 9. Integrating with the Photos and Music + Videos Hubs

 

This chapter covers

  • Loading and saving pictures in the media library
  • Viewing and sharing photos
  • Recording voice with the microphone

Windows Phone contains several built-in applications, including the Phone Dialer, Email, Camera, Bing search, Photos Hub, and Music + Videos Hub. In chapters 5 and 8 you learned how to use launchers and choosers and the PhotoCamera class to interact with the built-in applications. Most of these interactions consisted of sample applications launching the built-in applications. In this chapter you’re going to learn how to make the Photos Hub and Music + Videos Hub launch your application.

The built-in applications use navigation URLs to launch your application and pass information. The Photos Hub uses extensibility features to display a list of applications in the hub panorama, as well as in various menus displayed throughout the hub. When viewing a picture, the user can choose to share, edit, or view the picture with your application. In this chapter you’re going to extend the Photo-Editor sample application from chapter 8 to use Photo Extensibility for Windows Phone. Along the way, you’ll learn to use the MediaLibrary from the XNA Framework to read and write pictures to the phone’s picture albums.

9.1. Working with pictures in the media library

9.2. Editing and sharing from the Photos Hub

9.3. Playing and recording with the Music + Videos Hub

9.4. Playing recorded audio in the Music + Videos Hub

9.5. Playing recorded audio with a background agent

9.6. Summary