检测HDMI端口的Andr​​oid设备 [英] Detect HDMI Port in android device

查看:512
本文介绍了检测HDMI端口的Andr​​oid设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android开发应用程序,需要检测HDMI端口。可有一个人指导我,我怎么能检测的Andorid设备编程HDMI端口。

I am working on a Android development app that needs to detect HDMI Port. Can some one guide me how can i detect HDMI port in andorid device programatically.

在此先感谢

推荐答案

您可以尝试收听广播隐藏Android的意图

You could try to listen to the broadcast hidden android intent

"android.intent.action.HDMI_PLUGGED"

如果您使用的Andr​​oid 4.0或更高版本,或者如果您使用的索尼设备:

if you use android 4.0 or higher or if you use Sony device:

"com.sonyericsson.intent.action.HDMI_EVENT"

检查本教程的详细信息:的http://developer.sonymobile.com/2012/05/29/how-to-use-the-hidden-hdmi-api-tutorial/

Check this tutorial for more information: http://developer.sonymobile.com/2012/05/29/how-to-use-the-hidden-hdmi-api-tutorial/

也有第三方的libraires像KernelSwitchObserverLib http://forum.xda-developers.com/showthread.php?t=1963785

There are also 3rd party libraires like KernelSwitchObserverLib http://forum.xda-developers.com/showthread.php?t=1963785

这篇关于检测HDMI端口的Andr​​oid设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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