如何检测音乐在后台播放 [英] How to detect that music play in background

查看:173
本文介绍了如何检测音乐在后台播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助来检测手机上是否有音乐在后台播放,因为我在我的应用程序中顺序播放了多个音乐,但它们是交集的 谢谢

I want help in detecting if there is a music play in background on the phone or not because I play more than one music sequentially in my app but they are intersection thank you

推荐答案

我认为您正在寻找的是

AudioManager.isMusicActive()

AudioManager.isMusicActive()

您可以在此处找到有关 AudioManager的更多详细信息

You can find more detailed info about AudioManager here

这篇关于如何检测音乐在后台播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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