一键导入
firetv-leanback
Fire TV leanback manifest configuration: banner icons, LEANBACK_LAUNCHER intent filter, TV-specific Android settings
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fire TV leanback manifest configuration: banner icons, LEANBACK_LAUNCHER intent filter, TV-specific Android settings
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Template repo file structure: where screens, navigation, theme, data, and platform entries live in the monorepo
Android TV build and D-pad QA using Android CLI first, with bounded Gradle and ADB fallbacks
Expo Application Services cloud build configuration for TV app APK and IPA generation
Expo TV configuration: app.json plugins, prebuild settings, platform-specific config for react-native-tvos
Gradle build commands: assembleDebug, assembleRelease, APK output paths, and emulator installation
Fire TV Vega OS (Kepler) build system: npx kepler build, Vega app structure, platform-specific components
| name | firetv-leanback |
| description | Fire TV leanback manifest configuration: banner icons, LEANBACK_LAUNCHER intent filter, TV-specific Android settings |
| applies_to | ["phase_brand","phase_build"] |
| load_when | targeting `androidtv` or `firetv-fos` |
Android TV and Fire TV (Fire OS) share the same Android runtime and require the same manifest configuration to be recognized as TV apps by the system. Without these settings, an APK installs but doesn't appear in the TV launcher, or worse: appears with the wrong icon and gets rejected from the store.
This skill covers what apps/expo-multi-tv/app.json and the generated AndroidManifest.xml must contain.
For Fire OS / Android TV to recognize the app as a TV app:
isTV: true in the Expo config-tv plugin options.androidTVBanner asset (exactly 400×240 PNG) referenced from app.json.LEANBACK_LAUNCHER intent filter on the main activity. The plugin generates this when isTV: true.uses-feature android.software.leanback (required=false) in the manifest. Plugin handles it.If the agent finds itself manually editing AndroidManifest.xml, stop. The plugin should produce it. Manual edits get wiped on next prebuild.
app.json shape (verified against template){
"expo": {
"name": "AppName",
"slug": "app-slug",
"plugins": [
[
"@react-native-tvos/config-tv",
{
"isTV": true,
"androidTVBanner": "./assets/icon-400x240.png"
}
]
],
"android": {
"package": "com.example.appname",
"versionCode": 1
},
"ios": {
"bundleIdentifier": "com.example.appname"
}
}
}
Notes:
@react-native-tvos/config-tv should come before any plugin that modifies the Android manifest.package and iOS bundleIdentifier should match your domain. Fire TV store and Apple TV App Store check these.The replace_assets tool generates this if not provided. Generation rule:
brand.background_color or brand.primary_color (whichever has better contrast with the logo).apps/expo-multi-tv/assets/icon-400x240.png.Fire TV is Android TV with extra:
You usually don't need to. The build artifact is the same APK and runtime APIs are identical. Reach for runtime detection only for:
If you need it:
import { NativeModules, Platform } from "react-native";
const isFireOS = Platform.OS === "android" &&
/amazon/i.test(NativeModules.PlatformConstants?.Manufacturer ?? "");
This goes in a single utility file (isFireOS.android.ts) — don't sprinkle it.
Android TV remote sends KEYCODE_DPAD_CENTER for the center press. React TV Space Navigation translates this to a "select" event on the focused element. It does not translate to onPress on a regular <Pressable> unless the Pressable is wrapped in a focusable.
Use the template's themed <Pressable> (which is already wrapped) or wrap manually with <SpatialNavigationFocusableView>. Don't use <TouchableOpacity> — it responds to touch, not to focus + select.
# In apps/expo-multi-tv/
EXPO_TV=1 npx expo prebuild --platform android --clean
cd android && ./gradlew assembleDebug
cd ..
android describe --project_dir=android
android run \
--apks=android/app/build/outputs/apk/debug/app-debug.apk \
--device=<deviceId> \
--activity=.MainActivity
--device is required when multiple emulators or devices are connected,
including a phone emulator that may also be running. Forget this and the app
can install on the wrong target.
To find Fire TV device IDs:
adb devices
# AFTSS, AFTMM, AFTT, etc. are Fire TV model codes
To find the leanback emulator:
android emulator list
After install, check:
If any of these fail, the manifest is wrong. Most often: isTV: true got lost during a custom plugin config merge.
| Symptom | Cause | Fix |
|---|---|---|
| App doesn't appear on TV home | Missing leanback launcher intent | Verify isTV: true, run expo prebuild --clean |
| Generic icon instead of banner | Banner path wrong, file missing, or wrong dimensions | Check path in app.json, verify 400×240 |
| "App not optimized for TV" warning | Missing uses-feature leanback | Plugin should add it; re-prebuild |
| Crash on launch on Fire TV only | Dep uses Play Services | Find a Fire-compatible alternative or stub the feature |
| Remote doesn't navigate | Touch-only components used | See spatial-navigation.md |
android.software.leanback feature in the manifest.The harness doesn't submit. It produces an APK that's ready to submit.
AndroidManifest.xml. Use plugins. Manual edits are erased on prebuild.