How to identify Amazon Fire TV and Fire Stick in code level (HTML/JavaScript) ..?

1.7k views Asked by At

I have developed a Fire TV application using HTML5 and JavaScript. Here I need to identify what is the currently accessing device. Either Amazon Fire TV or Amazon Fire Stick.

How can I do this using HTML/JavaScript..?

Thanks

1

There are 1 answers

0
Christina On BEST ANSWER

You should be able to distinguish them by checking the user agent string which has the device model.

android.os.Build.MODEL

  • AFTB (Fire TV Gen 1)
  • AFTS (Fire TV Gen 2)
  • AFTM (Fire TV Stick Gen 1)
  • AFTT (Fire TV Stick Gen 2)