Windows to Android second screen
ExtendSpace
In development · Connect still disabled
Can a tablet on a USB cable become a dependable second screen for Windows?
A Windows host and an Android companion that stream the desktop to a tablet. The production session path has streamed a live 1080p60 picture over USB to one tablet, driven by gated acceptance tests. Ordinary use is not possible yet: Connect is still disabled.
- Role
- Personal project · MIT licensed
- Period
- 2026 – present
- Stack
- C# / .NET 10 · WinUI 3 · Kotlin · Jetpack Compose · H.264 (MediaCodec) · USB transport
- Windows desktop
- Capture and hardware H.264 encoding, under a session owner
- USB link that recovers from a pulled cable
- A dedicated decoder owner on the tablet
- Surface → tablet display
The aim
ExtendSpace turns an Android tablet into a second display for Windows: mirroring first, and true extension later, which needs a virtual display driver on Windows. The work so far is the streaming pipeline and the session machinery around it.
What has been tested
On one PC and one tablet (a Xiaomi Pad 7 over USB), the production session path streamed a 1080p60 test pattern for ten minutes: 36,081 frames sent, all of them decoded and released to the tablet's surface. A later sixty-minute soak at 1080p60 drew all 216,212 frames, and the same build was exercised through the 720p30 fallback, rotation, screen-off, cable pulls and a frozen app.
These runs were driven by gated acceptance tests on the PC and a debug-only screen on the tablet. They show the pipeline working on one setup; they are not broad device validation.
How it is put together
- Windows host in C# and WinUI 3: capture and hardware H.264 encoding behind a production session owner.
- Android companion in Kotlin and Jetpack Compose: link, decoder ownership and surface handling, with a session state model covered by unit tests.
- A draft wire protocol, implemented on both sides, over a USB transport with reconnection.
- Decoder creation happens on one owner thread per receiver, never on the reader thread; a creation is used only if it still matches the stream that is wanted.
Not done yet
- Connect is disabled in both apps, and each says so in its own interface.
- Wi-Fi transport and pairing are not implemented. Input forwarding does not exist yet.
- The virtual display driver for Extend mode is not implemented; only its feasibility has been researched.
- One fault is open: Windows occasionally stops delivering captured frames while a browser plays video full screen, and nothing detects it yet.