O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Custom Audio Player Agent

An audio player agent can be created by selecting the Windows Phone Audio Playback Agent project type from the Visual Studio New Project dialog (see Figure 34.1). This produces a new project that includes a class that derives from AudioPlayerAgent.

Image

FIGURE 34.1 Visual Studio Windows Phone agent projects.

When you link to an Audio Player Agent project from your main project, a BackgroundServiceAgent task definition is added to your main project’s WMAppManifest.xml file, resembling the following:

<Tasks>  <DefaultTask  Name="_default" NavigationPage="MainPage.xaml"/>  <ExtendedTask ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required