4

I'm trying to figure out if there is a way for me to block HDMI output when my application is running on Android? I need to support minimum API 17 (Android 4.2).

Is there such method I can call to control (hide/show) HDMI output?

/sys/class/switch/hdmi/state

this file value changes depending on the state of the HDMI

1 for HDMI connected
0 for HDMI disconnected

Can I do something with that?

Thank you.

aldok
  • 17,295
  • 5
  • 53
  • 64
ᴛʜᴇᴘᴀᴛᴇʟ
  • 4,466
  • 5
  • 39
  • 73
  • Yes, it's possible, as eg. The Sky Go app and other TV apps do this. Check http://stackoverflow.com/questions/22778075/android-disable-hdmi and http://stackoverflow.com/questions/15061621/how-do-i-disable-hdmi-port-of-a-android-device-without-rooting-it I have no experience with this though. – Jonas Czech Feb 03 '16 at 14:56
  • Presentation API only allows allows you to show different content on the presentation display (HDMI display). I didn't see any way to actually disable the HDMI display. Both of those solutions are same and they both use DisplayManager with Presentation API. Thanks for the idea tho. It's interesting – ᴛʜᴇᴘᴀᴛᴇʟ Feb 04 '16 at 07:51
  • try this ans http://stackoverflow.com/a/23025495/3678308 – Muhammad Waleed Mar 28 '16 at 04:19
  • Have a look at: http://developer.android.com/reference/android/app/Presentation.html – MahdeTo Mar 29 '16 at 03:44
  • Do you have any luck in HDMI controlling? It is very important in my task! – Alex Kovytin Jun 18 '17 at 22:19

0 Answers0