2015-10-26, 17:49
Hi,
I'm wondering if anyone who has worked on Kodi for Android could be able to point me in the right direction for a problem I'm having.
I'm developing a video playing app on a Minix X8 Plus that runs on Kodi for Android.
I'm trying to detect the display connected via an HDMI connection. The Minix device has no built in display. Whenever I use the normal Android methods for getting information about the display, I get back "Built-in display" for the display name, and 1920 x 1080 for the display size, regardless of whether a display is currently plugged into the HDMI port.
These Android methods are
DisplayManager displayManager = (DisplayManager) getSystemService(DISPLAY_SERVICE);
Display[] displays = displayManager.getDisplays();
Display display = getWindowManager().getDefaultDisplay();
The behavior remains consistent whether or not the HDMI Auto Detect is turned on under the display portion of the settings on the device.
I have also registered a BroadcastReceiver to listen for the action "android.intent.action.HDMI_PLUGGED", and I'm not getting any response off of that when the HDMI cable is plugged / unplugged.
I'd be really appreciative if anyone involved with Kodi could point me in the right direction as how to detect the HDMI display from an Android app using Java.
If it makes any difference, this app is running at system level.
Thanks much,
Jeff
I'm wondering if anyone who has worked on Kodi for Android could be able to point me in the right direction for a problem I'm having.
I'm developing a video playing app on a Minix X8 Plus that runs on Kodi for Android.
I'm trying to detect the display connected via an HDMI connection. The Minix device has no built in display. Whenever I use the normal Android methods for getting information about the display, I get back "Built-in display" for the display name, and 1920 x 1080 for the display size, regardless of whether a display is currently plugged into the HDMI port.
These Android methods are
DisplayManager displayManager = (DisplayManager) getSystemService(DISPLAY_SERVICE);
Display[] displays = displayManager.getDisplays();
Display display = getWindowManager().getDefaultDisplay();
The behavior remains consistent whether or not the HDMI Auto Detect is turned on under the display portion of the settings on the device.
I have also registered a BroadcastReceiver to listen for the action "android.intent.action.HDMI_PLUGGED", and I'm not getting any response off of that when the HDMI cable is plugged / unplugged.
I'd be really appreciative if anyone involved with Kodi could point me in the right direction as how to detect the HDMI display from an Android app using Java.
If it makes any difference, this app is running at system level.
Thanks much,
Jeff