Я использовал этот код для проверки вторичного дисплея:
Код: Выделить всё
fun getSecondaryDisplay(context: Context): Display? {
val displayManager = context.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager
return displayManager.displays.find { it.displayId != Display.DEFAULT_DISPLAY }
}
Подробнее здесь: https://stackoverflow.com/questions/781 ... pen-my-apk