-
Notifications
You must be signed in to change notification settings - Fork 111
Developer guide and differences from Android
This page is intended to provide helpful details to developers.
While the APIs between Android and Fire TV are very similar, the development experience is not the same:
- There is no Fire TV emulator: there is an Android TV emulator but it's behavior may differ from a Fire TV device
- You must connect to adb over Wifi: see the README for more details.
- Fire TV devices have lower specs than high-end Android smartphones. The high-end Fire TV device has 8GB of storage space and 2GB of RAM
- The Amazon Fire TV Remote App can be used to control the device: make sure you test with it!
Ordinarily screen readers on Android use an application called TalkBack but the Fire TV uses VoiceView. Since Fire TV does not have an emulator, you will have to do all accessibility development on device. VoiceView will give you a tutorial on how to use it when you first turn it on and can be replayed through an option on the VoiceView settings screen. For an overview of VoiceView, see the Amazon docs.
From a coding perspective, implementing basic accessibility with VoiceView is identical to TalkBack on standard Android: to learn how to develop accessibility for the Android platform in general, see the official Android docs (the video there is really good). To find out how to write VoiceView-specific functionality – orientation text, usage hints, etc. - see the official Amazon docs. [mcomella] In my experience, sometimes an implementation that works on TalkBack/standard Android will act differently on VoiceView/Fire TV: I expect these are bugs and you'll have to find a workaround.
Generally, you can manage accessibility in XML and will not need to add an AccessibilityDelegate
. If you do, consider if what you're doing is good accessibility practice. If you still do, note that AccessibilityDelegates on Fire TV do not act anything like they do on Android. They also have minimal, and possibly inaccurate, docs and are unintuitive on both platforms: continue at your own risk! You can access the Amazon docs here and the Android version (again this is not the same as Fire TV's) here.
The device specs could come in handy when debugging (what OS version does this device run? How much RAM does it have?). Here are some additional notes:
- Minimum supported SDK on Fire TV devices is 22
- Minimum supported WebView version is v59
- Some TVs maybe unable to power the Fire TV over USB because they go into standby
- 802.1x wifi authentication is unsupported
- Performance of the device may change if it's powered by a TV or power adapter. Via the 3rd generation product page: If you are using your TV to power Fire TV instead of the included power adapter, you may experience issues with 4K content playback. We recommend using the included power supply for best performance of your device.
In this repo there's IWebView, FirefoxWebView, WebChromeClient, WebViewClient, IWebViewLifecycleFragment, WebViewProvider, SessionCallbackProxy, and it can be confusing how they all relate to each other. As a stop-gap, here is a rough map of how these interact with each other.
Some devices support voice commands:
- Fire TV Cube:
Alexa, <command>
- Other devices with microphone button: press the mic button on the remote and speak your command
Commands directly related to Firefox:
-
Open <app>
, e.g. "Open Firefox" - Media playback control (AKA MediaSession; on v2.2, only Cube and 4K supported)
- Play/pause
-
Rewind/fast-forward <duration> <units>
, e.g. "rewind 1 minute" - Restart
- Next/previous (e.g. to move to a different item in the playlist; website must support "media next/previous" keyboard events, like YouTube)
General device commands:
- Fire TV Cube only: all Echo commands (with Show visual capabilities) and Alexa skills
- Fire TV Cube only: if you issue commands with the TV off, the TV will turn on and the command will execute
- "Turn on/off the TV" (only Cube can turn on TV)
- "Show me sci-fi movies" to see search results for sci-fi movies
- "Show movies playing near me" to see movie trailers
- ...music commands