'Listen to HDMI input port

I am working with a tv-box. In this tvbox, it contains an HDMI input port. Is there any method to listen to the HDMI input singal (connect, disconnect...)?

I found android.media.AudioManager.ACTION_HDMI_AUDIO_PLUG, but it's only for HDMI output signal:

 BroadcastReceiver hdmiListener = new BroadcastReceiver() {

        public final void onReceive(final Context context, final Intent intent) {
            final String action = intent.getAction();
            showTestLog("hdmiListener - " + action + " received.");
            if (action != null && action.equals(Keys.Action.HDMI_INTENT)) {

                int state = intent.getIntExtra(Keys.Action.HDMI_STATE, -1);
                showTestLog("hdmiListener - state = " + state);
            }
        }
    };


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source