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
check the file /sys/class/switch/hdmi/state, if it's 1 then it's connected to an HDMI.
/sys/class/switch/hdmi/state