Android | Find number of displays connected
You why you would need that. I used it to detect if screen mirroring is on or not. If length of displays is greater than 1 then screen mirroring is on else not. It’s not hundred percent upto the mark. May be we can use the MediaRouter API too. I haven’t gone through that much