简体   繁体   English

如何以编程方式确定Android上已安装的音频应用程序

[英]How to programmatically determine installed audio applications on Android

I'm trying to programmatically determine what audio applications are installed on an Android phone. 我正在尝试以编程方式确定Android手机上安装了哪些音频应用程序。 I'm able to enumerate all the installed applications, but don't yet see a way to figure out which ones are capable of playing audio? 我可以枚举所有已安装的应用程序,但是还没有找到一种方法来找出哪些可以播放音频? What property of the application would have to queried to determine if is capable of playing audio? 必须查询应用程序的什么属性才能确定是否可以播放音频?

Thanks in advance. 提前致谢。

You'll probably want to [queryIntentActivites][1] with an ACTION_VIEW Intent with the MIME type specified as whatever form of audio you're playing. 您可能想要使用ACTION_VIEW Intent来[queryIntentActivites] [1],并将MIME类型指定为您正在播放的任何音频形式。

[1]: http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent , int) [1]: http : //developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent ,int)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM