How to check the HDMI device connection status in Android?

前端 未结 5 575
不知归路
不知归路 2020-12-03 05:55

I need to detect whether an HDMI device is connected or not to my Android device. For this I\'m using a BroadcastReceiver and it is able to detect also. But with BroadcastRe

5条回答
  •  离开以前
    2020-12-03 06:07

    check the file /sys/class/switch/hdmi/state, if it's 1 then it's connected to an HDMI.

提交回复
热议问题