Detect HDMI Port in android device

后端 未结 1 759
执笔经年
执笔经年 2021-01-05 22:37

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.

Thanks

相关标签:
1条回答
  • 2021-01-05 23:03

    You could try to listen to the broadcast hidden android intent

    "android.intent.action.HDMI_PLUGGED"
    

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

    "com.sonyericsson.intent.action.HDMI_EVENT"
    

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

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

    0 讨论(0)
提交回复
热议问题