question

Brandon Hoskins avatar image
Brandon Hoskins asked

Unity Fire TV

How do I detect if my app is running on a fire TV? Any update on a unity plugin or some kind of documentation relating to using the unity game engine? Thanks
fire tv
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DougM@Amazon avatar image
DougM@Amazon answered

Hello Brandon! If you are looking to detect within Unity whether or not you are on FireTV you can always use the SystemInfo.deviceModel property to detect this. You could look to see if(SystemInfo.deviceModel.Equals("Amazon AFTB")) to check specifically for the Amazon FireTV. As far as plugins or documentation on how to integrate your Unity games in FireTV; if you could let us know what you are specifically looking for we can see what we can do to help you get started.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brandon Hoskins avatar image
Brandon Hoskins answered

Thanks for the response. I guess I was looking for an example. My app current uses touch controls so I guess I need to have an on screen cursor that you move to select things. I was just wonder how others have implement it. This is what I have found for the controls is this correct.

Remote: Up- KeyCode.UpArrow Down- KeyCode.DownArrow Left- KeyCode.LeftArrow Right- KeyCode.DownArrow Center Button- KeyCode.JoystickButton0 Back Button- KeyCode.Escape Menu Button- KeyCode.Menu

Controller: Left stick- X axis- x axis Y axis- y axis Button- Keycode.JoystickButton8 Right stick- X axis- 3rd axis Y axis- 4th axis Button- Keycode.JoystickButton9 Dpad- X axis- 5th axis Y axis- 6th axis A- Keycode.JoystickButton0 B- Keycode.JoystickButton1 X- Keycode.JoystickButton2 Y- Keycode.JoystickButton3 L1- Keycode.JoystickButton4 R1- Keycode.JoystickButton5 L2- 13th axis R2- 12th axis Back Button- KeyCode.Escape Menu Button- KeyCode.Menu

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brandon Hoskins avatar image
Brandon Hoskins answered
Thanks this should be enough information to get me started, but I found amazon game circle unity package extremely helpful, and if amazon could release something similar for Fire Tv, unity developers will really appreciate it. Thanks Brandon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chris Gripeos avatar image
Chris Gripeos answered
Hi, I had the same problem and I thought that I could just check if Unity's SystemInfo.deviceType is console or desktop. But it seems that the FireTV is detected as a handheld. I am worried that checking the SystemInfo.deviceModel is not future proof and when new device models come out I'll have to push a new patch.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered

Hi,

You should be able to look up the android.os.Build.MODEL, and anything that matches "AFT*" should be a Fire TV device, as can be seen in the Fire TV device and platform specs page: https://developer.amazon.com/public/solutions/devices/fire-tv/docs/device-and-platform-specifications

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.