Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect if another audio is playing in background? (Windows Phone 7)

One of my apps have recently failed certification because: "my app stops background music without asking user when it wants to play some music".

Now the question is: how can we detect if there is any music playing in the background?

Regards

like image 716
Mo Valipour Avatar asked Aug 11 '11 23:08

Mo Valipour


1 Answers

  using Microsoft.Xna.Framework.Media;

...

    if (Microsoft.Xna.Framework.Media.MediaPlayer.State == MediaState.Playing)
    {
          ....
    }
like image 86
Damian Avatar answered Sep 20 '22 09:09

Damian