0

Is there a way to handle the event of the user pressing Next or Previous on the media player controls that come down when the volume hardware buttons are pressed? Examples I've seen with the BackgroundAudioPlayer use songs that come with the XAP but I want to use the user's media library with the controls.

Is there a way to detect the next or previous event?

XSL
  • 2,965
  • 7
  • 38
  • 61

2 Answers2

0

It is not possible for you to detect that Next or Previous is pressed when the built-in media app (or any other 3rd party app that isn't your own) is in control of the audio.

Paul Annetts
  • 9,554
  • 1
  • 27
  • 43
-1

Yes, you're looking for SkipNext and SkipPrevious which are UserActions.

There's a good sample that runs through a lot of this logic at http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394039(v=vs.105).aspx

Oren
  • 3,273
  • 2
  • 19
  • 15
  • That doesn't seem to work. I've referenced the AudioPlayerAgent project but the UserAction event doesn't seem to be called. – XSL Jun 19 '13 at 16:58