Background Audio Agents

Version: 1.0.0

Description

Windows Phone codenamed "Mango" makes it possible for applications to continue playing audio even while inactive. This lab will show you how to accomplish this by using the new Background Audio Player class in order to enhance the functionality of an existing music player application.

Overview

In the original Windows® Phone operating system, we could create a music player but the application was not able to continue playing music while inactive.

As we will see during this lab, with Windows® Phone Codenamed Mango, an application is able to continue playing audio even while inactive. To do this, we will use the new Background Audio Player class in Microsoft.Phone.BackgroundAudio namespace.

This lab shows how to use background audio in your application using the new Windows® Phone Codenamed Mango API, by developing a Music Player that can become inactive and continue playing music.

Objectives

This lab will show you how to:

  • Use the BackgroundAudio class to play music even if your application is not active.
  • Implement a background agent in your application

Prerequisites

The following prerequisites will help you gain the most from this hands-on lab:

  • Microsoft Visual Studio 2010 or Microsoft Visual C# Express 2010, and the Windows® Phone Developer Tools available at https://go.microsoft.com/?linkid=9772716
  • Prior knowledge regarding development of Windows® Phone applications (If you are new to Windows® Phone 7 development, begin by reading https://msdn.microsoft.com/en-us/gg266499. This lab assumes you understand the basics and focuses on demonstrating background audio.)

Estimated completion time

Completing this lab should take between 20 and 40 minutes.