gpt4 book ai didi

android - 检测 Android 设备中的 HDMI 端口

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:38:38 26 4
gpt4 key购买 nike

我正在开发一个需要检测 HDMI 端口的 Android 开发应用程序。有人可以指导我如何以编程方式检测 andorid 设备中的 HDMI 端口吗?

提前致谢

最佳答案

你可以试试听广播隐藏的android intent

"android.intent.action.HDMI_PLUGGED"

如果您使用 android 4.0 或更高版本或者如果您使用 Sony 设备:

"com.sonyericsson.intent.action.HDMI_EVENT"

查看本教程以获取更多信息:http://developer.sonymobile.com/2012/05/29/how-to-use-the-hidden-hdmi-api-tutorial/

还有像 KernelSwitchObserverLib 这样的第三方库 http://forum.xda-developers.com/showthread.php?t=1963785

关于android - 检测 Android 设备中的 HDMI 端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13430835/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com