Skip to content

SiloControl 1/3: Android TV remote-control receiver (_silocast advertising + control protocol) #15

Closed

Description

@Quick104

Summary

Port the SiloControl TV-side receiver from the Apple clients so the Android TV app can be remote-controlled by a phone on the LAN. This is part 1 of 3 of the SiloControl port (receiver → phone remote → play-on launch).

Apple reference implementation

  • silo-apple/iosApp/iosApp/Control/TVControlReceiver.swift — accepts phone connections, verifies access token (5s grace), executes commands against the registered player, pushes state
  • silo-apple/iosApp/iosApp/Control/SiloControlProtocol.swift — wire protocol: hello/ping/pong, SiloControlCommand, SiloControlPlaybackState, SiloControlPlaybackRequest
  • Transport: Bonjour _silocast._tcp advertising with TXT record (name, id, server, serverName, playing), TLS + length-prefixed framed JSON (FramedJSONSession.swift, PSK silo-companion-pairing-v1 pattern in SiloLANTLS)

Scope

  • Advertise _silocast._tcp via NsdManager while the TV app has a registered player (mirror the existing pairing NSD usage in this repo)
  • Accept a TLS connection, speak the same framed-JSON protocol and message schema as Apple (wire-compatible: an iPhone should be able to control the Android TV, and vice versa once part 2 lands)
  • Handle the full command set: play, pause, playPause, seek, stop, selectAudioTrack, selectSubtitleTrack, setPlaybackSpeed, setQuality, setVideoGravity, setHDREnabled, setSubtitleSyncMs, setSubtitlePosition, setVolume, setMuted, playNext — wired to the shared MediaController / player session in android-shared
  • Push SiloControlPlaybackState on every state change; reply to ping heartbeats
  • Access-token verification against the active server session

Acceptance criteria

  • TV app advertises while playing; stops advertising when idle (or advertises with playing=0 per Apple behavior)
  • An iOS phone running the current Apple app can discover and control Android TV playback (manual test)
  • Unit tests for protocol encode/decode of all message types
  • ./gradlew :androidTvApp:assembleDebug passes

Part of the July 2026 Android↔Apple parity audit (see label).

Activity

  1. added
    enhancement
    parity-audit
    on Jul 3, 2026
  2. Quick104 commented on Sep 11, 2026

    @Quick104
    ContributorAuthor

    Closing as shipped: Android TV SiloCast/SiloControl receiver is on main (TvSiloCastReceiver, SiloCastNsdAdvertiser, shared SiloCastProtocol), documented in README, and further hardened in merged PRs such as #253 / #38.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementparity-audit

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions