-4

I am working on an universal app for Android TV and Android phone,
Is there any way we can programmatically check if app is running on android TV or android phone ?

Sunny
  • 11
  • 1

1 Answers1

0

I'd recommend checking if the device has a touch screen:

getPackageManager().hasSystemFeature("android.hardware.touchscreen");

Note however, that this is not guaranteed to work on all devices, as some manufactures don't implement it correctly in their ROMs.

FD_
  • 12,947
  • 4
  • 35
  • 62