Skip to content

Improve Android TV accessibility and media handling - #159

Draft
mukulhase wants to merge 1 commit into
yuroyami:masterfrom
mukulhase:fix/android-tv-dpad-focus
Draft

Improve Android TV accessibility and media handling#159
mukulhase wants to merge 1 commit into
yuroyami:masterfrom
mukulhase:fix/android-tv-dpad-focus

Conversation

@mukulhase

@mukulhase mukulhase commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • fix D-pad focus transfer from TV text editors to their reproduced neighboring controls
  • make the room overflow popup focusable and keep Up/Down navigation within its visible actions
  • replace unavailable Android TV document providers with an in-app, D-pad-native local video picker
  • add a TV-only Pre-download action that uses four HTTP byte ranges when supported, falls back to a sequential request, and publishes the result to Movies/Syncplay
  • allow a connected hardware keyboard to type, edit, and send chat messages while the room UI is locked
  • keep a stable incoming-message snapshot during fade-out so a new ineligible message cannot replace or cancel the displayed content

Reproduced issues

The following failures were reproduced on an Android TV API 36 emulator before changing them:

Surface Failure
Network URL dialog The editor could not reliably receive initial focus, and Down did not reach the action row after keyboard dismissal.
Home username/room fields Down stayed in the current editor instead of moving to the next field.
Shared playlist: Add URL The dialog opened without a focused node, and Down did not reach Done after keyboard dismissal.
Seek To Left stayed in seconds instead of moving to minutes.
Subtitle search Right stayed in the search editor because the search action was not focusable.
Managed room name Down stayed in the editor instead of reaching the actions.
Trusted domains Down stayed in the editor instead of reaching the actions.
Room overflow Opening the three-dot menu left focus behind the popup, and Leave room was unreachable with Down.
Local video picker Android TV reported that no app could handle file selection; the available media-provider grid was also not D-pad focusable.
Fading chat A later self/seen message could replace the message being animated out and cancel the intended presentation.

Behavior

  • Android TV editors route directional input into explicit Compose focus destinations once the IME is no longer handling navigation.
  • Popup action controls are real TV focus targets and respond to D-pad Center/Enter.
  • The overflow popup takes focus at its first available action, traverses its visible rows, and allows Leave room to be activated.
  • Downloaded videos appear in the in-app local picker and can be selected later.
  • Entering locked mode immediately dismisses any active IME and transfers focus to a non-editor surface; printable hardware-key events update a compact draft, Backspace edits it, and Enter sends through the existing chat dispatcher.

Verification

  • ./gradlew :shared:testAndroidHostTest :androidApp:assembleExoOnlyDebug -PexoOnly=true --no-daemon
  • URL editor: Back, Down, Right, Center focused and activated Pre-download
  • overflow: initial focus moved to Picture-in-Picture and three Down presses reached Leave room
  • parallel download server observed one range probe followed by four concurrent byte-range requests; completion was published as parallel-test.mp4
  • the downloaded file appeared in the in-app local picker and was selected successfully
  • locking while the chat IME was visible, followed immediately by a raw hardware key, left mInputShown=false, removed the input connection, and updated only the compact locked draft
  • locked UI accepted hardware text, removed a full character with Backspace, and sent with Enter
  • final APK installed and launched on a paired Google TV Streamer

@mukulhase
mukulhase marked this pull request as draft July 19, 2026 23:31
@mukulhase
mukulhase force-pushed the fix/android-tv-dpad-focus branch 4 times, most recently from 34fbcb4 to 1b9494d Compare July 25, 2026 01:47
@yuroyami

Copy link
Copy Markdown
Owner

I'll review this soon and include it in the next release shortly

@mukulhase
mukulhase force-pushed the fix/android-tv-dpad-focus branch 2 times, most recently from 12ec728 to ae64a60 Compare July 27, 2026 04:37
@mukulhase mukulhase changed the title Fix Android TV D-pad focus navigation Improve Android TV accessibility and media handling Jul 27, 2026
@mukulhase
mukulhase force-pushed the fix/android-tv-dpad-focus branch from ae64a60 to 4437472 Compare July 27, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants