如何检测,如果背景音乐是​​玩WP8? [英] How to detect if background music is playing in WP8?

查看:258
本文介绍了如何检测,如果背景音乐是​​玩WP8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人已经开发WP应用程序,你知道,如果你的应用程序停止当前播放未经用户同意的音乐,你可以不通过认证了。

If anyone has developed WP apps before you know that you can't pass certification if your app stops music that is currently playing without the users consent.

我没有看到这个问题,<一个href=\"http://stackoverflow.com/questions/7034205/how-to-detect-if-another-audio-is-playing-in-background-windows-phone-7\">here这可能已经工作了WP7的应用程序,但它显然不为WP8工作。我认为这是行不通的,因为WP8操作系统不支持XNA(这仅仅是向下兼容的,如果你使用开发7.1的应用程序)。

I did see this question here which might have worked for WP7 apps but it apparently doesn't work for WP8. I assume it doesn't work because the WP8 OS doesn't support XNA (It is only backward compatible, and if you developed the app using 7.1).

有没有人碰到的解决方案,用于检测WP8背景音乐。

Has anyone come across the solution for detecting background music in WP8.

推荐答案

我相信检查<一href=\"http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.mediaplayer.gamehascontrol.aspx\"相对=nofollow> MediaPlayer.GameHasControl 是你在找什么。使用该财产和MediaPlayer的其他成员,以满足应用程序的认证准则6.5.1这里有一个如何@的http://henry-chong.com/2012/02/pro-tip-including-background-music-for-your-windows-phone-app/

I believe checking for MediaPlayer.GameHasControl is what you're looking for. Use that property and other members of MediaPlayer to satisfy application certification guidelines 6.5.1 Here's an end-to-end example of how @ http://henry-chong.com/2012/02/pro-tip-including-background-music-for-your-windows-phone-app/

顺便说一句,如果你的应用程序是一个音乐+视频应用6.5.x中的应用程序认证要求不适用。这是解决6.5.1 :)单向

BTW, 6.5.x application certification requirements don't apply if your app is a Music+Video app. That's one way to address 6.5.1 :)

这篇关于如何检测,如果背景音乐是​​玩WP8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆