Skip to content

Input picker for Mi TVs on the Android TV remote service - #7

Merged
EndLess728 merged 3 commits into
mainfrom
feat/input-source
Oct 20, 2026
Merged

EndLess728 merged 3 commits into
mainfrom
feat/input-source

Conversation

@EndLess728

Copy link
Copy Markdown
Owner

Switch inputs on Mi TVs that only have the Android TV remote service (#6).

That service has no input-source key, and the TV's key layout for it (virtual-remote.kl) has no entry for one. But the service can ask the TV to open links. The MOOR2's Live TV app switches inputs on standard TV-input passthrough links (content://android.media.tv/passthrough/<input id>).

  • Input source on those TVs opens a picker: HDMI 1, 2, 3 (switch directly) and Settings (full list of inputs). It closes once one is chosen. This is in the macOS and mobile apps. MiLink TVs keep the normal key.
  • Adds the app-link launch message (RemoteAppLinkLaunchRequest), checked against the reference protobuf. The macOS end-to-end test sends an HDMI link to the fake TV.
  • Opening the input menu itself by intent: link was tried and dropped: the service closes the connection on those.
  • The README explains why Recent apps can't work over this service (no key for it, and no link to the system UI).

Tested by the reporter on a MiTV-MOOR2 with 1.2.1-alpha.2: HDMI switching works.


Generated by Claude Code

The Android TV remote service has no input-source key, but it can ask
the TV to open links (RemoteAppLinkLaunchRequest), and the MOOR2's Live
TV app switches inputs on content://android.media.tv/passthrough links
(confirmed with adb, #6) and opens its input menu on the standard
com.android.tv.action.VIEW_INPUTS action.

On those TVs Input source now opens a panel to test: the input menu via
an intent: link (by action, or Xiaomi's activity), HDMI 1-3 directly,
and Settings as before. Adds the app-link message, checked against the
reference protobuf, and the end-to-end test sends a link to the fake TV.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YS6HGULeQFiqj9SZfZ7Gvv
Testing on the MiTV-MOOR2 (#6) showed HDMI passthrough links switch
inputs over the Android TV remote service, while intent: links for the
input menu make the service drop the connection. So on those TVs Input
source is now a picker: HDMI 1, 2, 3 (switch straight to the input) and
Settings (full list of inputs). It closes as soon as one is chosen.

Same picker in the mobile apps, with the app-link message and HDMI
links unit tested; the macOS end-to-end test sends an HDMI link to the
fake TV.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EndLess728
EndLess728 merged commit 8753cb9 into main Oct 20, 2026
5 checks passed
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