The Amazon Appstore uses Android manifest specifications. to determine which Fire devices are compatible with your APK. Incompatibilities between your manifest and a device’s capabilities will prevent the APK file from being targeted to that device. This page covers common topics to consider when working with manifests for APKs intended to target Fire devices.
Structuring Your Android Manifest File
Device targeting via the Android manifest file follows Android specifications. To see how you should structure the XML in your Android manifest file, including how to nest various elements, see the Android documentation:
Android and Amazon SDK Levels
Fire devices use Fire OS at their operating system. Since Fire OS is a custom version of Android, each Fire OS version corresponds to a single Android API level. Therefore, the first step in creating your manifest is to specify the proper Android API levels for the Fire devices you intend to target.
The Manifest Filter Reference shows the Android API level for each Fire device on the market. For example, to target all 2013 and newer tablets, your manifest should contain an entry like this:
<uses-sdk android:minSdkVersion="19" />
A couple of notes:
- Android API levels for devices change over time as OS updates are deployed. For example, 2014 Fire tablets run Fire OS 4.5, at Android API level 19. When these devices are updated to Fire OS 5.0, the Android API level will update to 22. If your binary is compatible with both versions of Fire OS (most are), ensure that API levels 19 - 22 are within the range specified by
- The Amazon Appstore also supports the
android:maxSdkVersionattribute, but only when determining if the app should be available on a specific device. It has no effect when the user updates their Fire OS to a later version. In most cases, use of this attribute is not needed unless there is a breaking incompatibility with a higher API level.
If your binary is built to support Fire OS only, use this element to specify the Amazon API level for those devices. You should not use this element if you intend to target both Fire and non-Amazon devices from the same binary. If you use this element in your manifest, the Amazon Appstore will exclude the binary from non-Fire devices.
From the same Manifest Filter Reference, 2013 Fire tablets use Amazon API level 3; therefore, to specify the binary is only for 2013 Fire devices or later, you could use this element:
<uses-amzn-sdk android:minSdkVersion="3" />
You may notice that some Fire tablets, Fire TV, and Fire TV Stick have Amazon API level 0. This is not a misprint. While these devices have an Amazon SDK, the SDK was not numbered at the time. You can use the
<uses-amzn-sdk> elements together to distinguish between 2011 and 2012 tablets. For example, to target 2012 and newer tablets, excluding original Kindle Fire tablets:
<uses-sdk android:minSdkVersion="15" /> <uses-amzn-sdk android:minSdkVersion="0" />
Notes on this element:
- Amazon API levels for devices change over time as OS updates are distributed. For example, 2014 Fire tablets run Fire OS 4.5, at Amazon API level 3. When these devices update to Fire OS 5.0, the Amazon API level will update to 4. If your binary is compatible with both versions of Fire OS, and you want your binary only on Fire devices, ensure that Amazon API levels 3 and 4 are within the range specified by
<uses-amzn-sdk>also supports the android:maxSdkVersion attribute, but only when determining if the app should be available on a specific device. It has no effect when the user updates their Fire OS to a later version. In most cases, use of this attribute is not needed unless there is a breaking incompatibility with a higher API level.
Common Hardware and Software Capabilities
Once you specify SDK levels, make sure your
<uses-features> elements are appropriate for the devices you are targeting. Refer to specifications for Fire Tablets and Fire TV for specific hardware and software capabilities.
Many developers are tripped up by implied features. Per the Android standard, specifying
<uses-permission> for certain capabilities implies one or more
<uses-feature> elements, with
android:required="true" assumed. Since the implied features are required, the APK is deemed not compatible with any device that does not provide those features, even if the app is designed to degrade gracefully when features aren’t present.
Consider this scenario: your app uses the device’s current location to find nearby gas stations. The app can get your current location from the device’s GPS, but if GPS is not available, the user can input an address or location. To use the GPS, you should include this element in your manifest:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
However, if you don’t explicitly define them, these elements are implicitly defined:
<uses-feature android:name="android.hardware.location" android:required="true" /> <uses-feature android:name="android.hardware.location.gps" android:required="true" />
If you then provide this binary to the Amazon Appstore; then only WAN models of Fire tablets would be compatible, since these are the only Fire devices with GPS capabilities. To be compatible with additional Fire devices, you should include these elements in your manifest, but specify them as not required (provided your app functions correctly without GPS):
<uses-feature android:name="android.hardware.location" android:required="false" /> <uses-feature android:name="android.hardware.location.gps" android:required="false" />
A full list of permissions that cause implied features is here: Permissions that Imply Feature Requests.
Specifying an Installation Location for Your App
Your Android Manifest file specifies the installation location for your app on Fire TV and Fire tablet devices. For most apps, setting this value to External Storage (
preferExternal) will provide a better experience for your app’s users. For more information, see Specifying the Installation Location for Your App.
Targeting Fire TV
This section describes certain caveats to keep in mind if you are building and submitting a Fire TV app to the Amazon Appstore.
Known Device Targeting Support Issues for Fire TV
Device targeting via Android manifest for Fire TV apps is not currently supported by the Amazon Appstore ingestion process. If you are targeting Fire TV with your app, you will need to manually specify Fire TV support as part of your submission form. For more information, see Target Fire TV Devices with Your App Manifest.
Fire TV devices do not support touchscreens and multi-touch capabilities. In an Android manifest, unlike other features, the touchscreen is assumed to be required unless explicitly stated otherwise. Thus, most binaries that run fine on tablets would be considered incompatible with Fire TV without a manifest change.
To specify that an app does not require a touchscreen, add the following element to your manifest:
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />