Any idea is how to do this under Android 4.0, or at least to detect and notify for connected displays.
Besides, possibly, MediaRouter in API level 16, as indicated in Distwo's answer, there was no support for application-level access to external displays in older versions of Android. Relatively few devices even supported external displays; those that offered only OS-level mirroring.
Best of all, if you want to call it, is to access several of these devices and see if there are general LogCat messages that indicate the presence of external displays or maybe some things at the Linux level in /proc . However, there is a very good chance that they will differ from the manufacturer and device.
How about whether an Android device is connected to record on the screen. Can the Presentation or DisplayManager API find this?
Not.
CommonsWare
source share