Home > Devices > Amazon Fire TV

Identifying Amazon Fire TV Devices

Overview

You can identify Amazon Fire TV devices by looking for amazon.hardware.fire_tv as a feature.

The following table provides a list of features for different Fire TV devices:

Feature Fire TV Edition Fire TV Stick
(Gen 2)
Fire TV
(Gen 2)
Fire TV Stick
(Gen 1)
Fire TV
(Gen 1)
amazon.hardware.fire_tv
amazon.hardware.low_power
amazon.hardware.uhd_capable
amazon.software.drm_teardown
android.hardware.type.television

In all cases, Fire TV devices can be identified through the feature amazon.hardware.fire_tv.

You get the feature by calling the getPackageManager() method on the Context object and checking whether hasSystemFeature() returns com.hardware.amazon.fire_tv. The following code shows a sample:

final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv";

if (getPackageManager().hasSystemFeature(AMAZON_FEATURE_FIRE_TV)) {
 Log.v(TAG, "Yes, this is a Fire TV device.");
 } else {
  Log.v(TAG, "No, this is not a Fire TV device.");
 }

Reasons for Checking the Fire TV Device

You might want to check for the Fire TV device in your code for a number of reasons:

  • To identify Amazon Fire TV for choosing strings or making special offers (like free Plex service).
  • To determine whether the app needs to tear down the DRM and HW decoding pipeline in their onPause() method (which is needed for Fire TV – 1st Generation and Fire TV Stick due to poor handling of multiple DRM contexts).
  • To check whether the TV platform requires a D-pad controller to drive the UI.
  • To determine whether the app should play 4k Ultra HD.

Checking for the Model

Previously, you could identify Fire TV devices by combining the android.os.Build.MODEL with the Build.MANUFACTURER. As more Amazon-powered devices come to market, this approach will no longer work.

If you absolutely have to switch behavior based on a specific Amazon product model, you may use the MODEL name. Be aware that such code will not likely work on future devices. As such, include a sensible fallback approach for future Fire TV devices based on the com.hardware.amazon.fire_tv feature.

The android.os.Build.MODEL value for Fire TV devices is as follows:

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

Here’s a code sample that looks for the model but falls back on the feature:

final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv";
String AMAZON_MODEL = Build.MODEL;

if (AMAZON_MODEL.matches("AFTS")) {
 Log.v(TAG, "Yes, this is a Fire TV Gen 2 device.");
} else if (getPackageManager().hasSystemFeature(AMAZON_FEATURE_FIRE_TV)) {
 Log.v(TAG, "Yes, this is a Fire TV device.");
} else {
 Log.v(TAG, "No, this is not a Fire TV device");
}