One of the requirements for windows store apps is that they support suspending. My app is marked as a background audio task, so it doesn't suspend when left alone, but it is supposed to suspend when the audio is paused.
I can't find out how to "tell Windows" when it can or can't suspend. How do I have my background audio application pass the package validation?
To enable background audio you must register handlers for the Media Control button events. These are in the Windows.Media.MediaControl class, specifically the PlayPressed, PausePressed, PlayPausePressed (some hardware has a single button for both), and StopPressed. If you don't have handlers for these, then background audio won't work. With the handlers, Windows will know when the audio is paused, and will then be able to suspend you. Fortunately, by virtue of your Play[Pause]Pressed handlers, Windows will also resume the app when playback starts again.
These events work for both hardware and on-screen buttons, e.g.
If you have multiple tracks you are playing, then registering handlers for NextTrackPressed and PrevTrackPressed controls whether the forward/back buttons are enabled here. The AlbumArt, TrackName, and ArtistName fields in the MediaControl class are also used to set the data in the medial control UI above.