我的一个应用程序最近失败的认证,因为:我的应用程序停止的背景音乐,而不要求用户当它要播放一些音乐
。现在的问题是:我们如何可以检测是否有音乐播放的背景
问候
解决方案 使用Microsoft.Xna.Framework.Media;
...
如果(Microsoft.Xna.Framework.Media.MediaPlayer.State == MediaState.Playing)
{
....
}
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
解决方案 using Microsoft.Xna.Framework.Media;
...
if (Microsoft.Xna.Framework.Media.MediaPlayer.State == MediaState.Playing)
{
....
}