Chapter 7. Integrating with the Pictures and Music + Videos Hubs

 

This chapter covers

  • Loading and saving pictures in the Media Library
  • Photo viewing and sharing
  • Recording voice with the microphone
  • Listening to the FM radio

Windows Phone contains several built-in applications, including the phone dialer, email, camera, Bing search, the Pictures Hub, and the Music + Videos Hub. In chapters 4 and 6 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 Pictures Hub and the Music + Videos Hub launch your application.

The built-in applications use deep link navigation URLs to launch your application and pass information. The Pictures Hub uses a feature known as App Connect 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 or view the picture with your application. In this chapter you’re going to extend the PhotoEditor sample application from chapter 6 to leverage App Connect 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.

7.1. Working with pictures in the Media Library

7.2. Editing and sharing from the Pictures Hub

7.3. Playing and recording with the Music + Videos Hub

7.4. Playing recorded audio in the Music + Videos Hub

7.5. Playing recorded audio with a background agent

7.6. Listening to FM radio

7.7. Summary