Configure the manifest (FireTV)
Configure the manifest in your Android app or Fire TV project.
Implementation
To complete the SDK import process, use the following Android or Fire TV steps to configure AndroidManifest.xml.
Android
-
In app/manifests/AndroidManifest.xml, in all
<activity>
elements that will contain a player, addandroid:configChanges="keyboard|keyboardHidden|orientation|screenSize"
. This prevents the Activity from being destroyed when rotated. -
(Optional) If your app reads media content from the user's device, add
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
.Android's Request App Permissions guide explains how requesting permissions works.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application>
...
<activity
...
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
</application>
Fire TV
In app/manifests/AndroidManifest.xml, add <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
. Since touchscreen support is assumed for all Android APKs, this explicitly declares that a touchscreen is not required.
To learn more about building apps for Fire TV, read Troubleshooting Android Manifest and Device Filtering.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
...
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application>
...
</application>
</manifest>
Updated about 1 year ago