[PR #1841] [CLOSED] feat: add basic Android TV support #1720

Closed
opened 2026-04-25 00:00:49 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1841
Author: @bilbospocketses
Created: 4/4/2026
Status: Closed

Base: masterHead: android-tv-basic-support


📝 Commits (1)

  • 1b0d8e0 feat: add basic Android TV support

📊 Changes

7 files changed (+53 additions, -13 deletions)

View changed files

📝 android/app/src/main/AndroidManifest.xml (+10 -0)
📝 android/app/src/main/java/com/audiobookshelf/app/CastOptionsProvider.kt (+16 -11)
📝 android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt (+12 -0)
📝 android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt (+10 -0)
📝 android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDatabase.kt (+3 -1)
android/app/src/main/res/drawable-xhdpi/tv_banner.png (+0 -0)
📝 plugins/capacitor/AbsDatabase.js (+2 -1)

📄 Description

Summary

  • Add leanback manifest declarations so the app appears in the Android TV launcher
  • Guard CastOptionsProvider against missing Google Play Services to prevent crash on launch
  • Add runtime TV device detection (UiModeManager) exposed to the WebView layer
  • Include TV launcher banner (320x180)

All changes are conditional — zero impact on the existing mobile experience. TV-specific code paths only execute when UiModeManager.currentModeType == UI_MODE_TYPE_TELEVISION.

Contributes to #606

Test plan

  • Sideloaded debug APK on Android TV — app launches without crashing
  • Browsed library content with remote — functional but not yet optimized for D-pad
  • Verified mobile build compiles with no new warnings
  • Test on additional Android TV devices (Shield, Fire TV, Chromecast w/ Google TV)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1841 **Author:** [@bilbospocketses](https://github.com/bilbospocketses) **Created:** 4/4/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `android-tv-basic-support` --- ### 📝 Commits (1) - [`1b0d8e0`](https://github.com/advplyr/audiobookshelf-app/commit/1b0d8e04a680e44351f12eee1af32a67ca4430b4) feat: add basic Android TV support ### 📊 Changes **7 files changed** (+53 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/AndroidManifest.xml` (+10 -0) 📝 `android/app/src/main/java/com/audiobookshelf/app/CastOptionsProvider.kt` (+16 -11) 📝 `android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt` (+12 -0) 📝 `android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt` (+10 -0) 📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDatabase.kt` (+3 -1) ➕ `android/app/src/main/res/drawable-xhdpi/tv_banner.png` (+0 -0) 📝 `plugins/capacitor/AbsDatabase.js` (+2 -1) </details> ### 📄 Description ## Summary - Add leanback manifest declarations so the app appears in the Android TV launcher - Guard CastOptionsProvider against missing Google Play Services to prevent crash on launch - Add runtime TV device detection (UiModeManager) exposed to the WebView layer - Include TV launcher banner (320x180) All changes are conditional — zero impact on the existing mobile experience. TV-specific code paths only execute when `UiModeManager.currentModeType == UI_MODE_TYPE_TELEVISION`. Contributes to #606 ## Test plan - [x] Sideloaded debug APK on Android TV — app launches without crashing - [x] Browsed library content with remote — functional but not yet optimized for D-pad - [x] Verified mobile build compiles with no new warnings - [ ] Test on additional Android TV devices (Shield, Fire TV, Chromecast w/ Google TV) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:00:49 +02:00
adam closed this issue 2026-04-25 00:00:50 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1720