Screen resolution is the same on AndroidTV box for all tv devices and monitors

Viewed 102

I`m developing some AndroidTV application for AndroidTV boxes. And I have noticed the very strange moment. If I try to get programmatically screen width and height

val width = resources.displayMetrics.widthPixels
val height = resources.displayMetrics.heightPixels

then these two values will be the same for all tv and all monitor (for one tv box) to which my tv box was attached. For example, on my xiaomi mi box 4 I obtain always screen resolution 1920x1080 and it does not matter, does TV have 4k resolution or does some monitor have 1280 × 720. And it is so strange and I did not understand, why it happens. How can I obtain real width and height of my screen in AndroidTV app? Maybe, there are some another methods for it?

1 Answers
Related