How to detect if it's Android TV OR Android TV Box?

2.5k views Asked by At

I developed an app for Android TV's and released. I want to know how many of the users are directly running the app on their TV's and how many using TV boxes.

Is there a way to detect whether my app is running on Android TV OR Android TV Box programmatically?

2

There are 2 answers

4
Michael Sotnikov On

getPackageManager().hasSystemFeature("android.software.live_tv")

0
ysrhlmky On

Android TVs and Android TV Boxes are almost identical, at least from the applications point of view. They both identify themselves as having a tv characteristic, which you can get from system properties.

Usually, TV apps should not depend on whether they run on a TV or a box.

But if you feel you should really know, maybe you can tell the problem a bit in detail, and we can help you find the right solution.