Image may be NSFW.
Clik here to view.
If you’re building a Windows Store app that plays audio you have the option of being able to play your app’s audio in the background (i.e. when the app is not running).Image may be NSFW.
Clik here to view.Image may be NSFW.
Clik here to view.
Over the course of three posts I want to share some tips and tricks you can use for enabling your apps to run audio in the background and make it through the Windows Store certification process. In this post I’ll show you how to enable background audio in your apps. Essentially there are two things you need to do. First you’ll need to add the capability to your application’s manifest. These can be done via the following steps:
- Open your application’s manifest (that’s the Package.appxmanifest file)
- Click on the Declarations tab
- Select Background Tasks from the Available Declarations drop down and click Add
- Check the Audio checkbox and enter either an Entry point or Start page
Image may be NSFW.
Clik here to view.
This will result in the following being added to the xml of the manifest :
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Congratulations! Your app can now play background audio. Warning! Your app will not pass certification…yet. To get into the store your app will need to register for media transport controls as well as consider handling sound level notification events. More on those in upcoming posts. Additional Resources: