Repository navigation
This release restores the Java Android screen-capture example for current Android versions while retaining Android 5.0 / API 21 as the minimum supported API. A suitable Surface encoder must support the selected format, size, and bitrate.
The attached APK is an example debug build, versionName 0.2.0, versionCode 2. It is not a production-signed package. Compatibility with the v0.1 debug signing key is not guaranteed. Preserve existing app data if an installation reports a signature mismatch.
- Fresh MediaProjection consent for every capture; private same-process foreground service with app, notification, and system Stop.
- TCP or best-effort UDP on port 49152; H.264 Annex B or VP8 IVF, with corrected initial headers and microsecond timestamps. Video only, without audio.
- Network work off the UI thread, bounded transmission, connection/write errors and timeouts, and complete session cleanup.
- Scrollable native Android form, input/permission/state handling, SDK 37, JDK 17, AGP 9.4.1, Gradle 9.8.0, and CI/unit tests.
- Updated English setup/FFplay instructions, contribution/security guidance, actual screenshots, and credited PR #13 cleanup ideas.
Verification: clean build, 15 unit tests, lint, device-test APK compilation, and GitHub-hosted CI passed. The API 36 physical device decoded each of TCP/UDP × H.264/VP8 for 125 seconds with changing frames and no remaining capture/sender threads. API 34/37 TCP/H.264 and API 21 TCP/VP8 also passed 125-second runs. Consent denial, app/system/notification Stop, restart, rotation, app switching, bad host, and API 37 screen lock were checked.
Recorded limits: the API 21 software-only emulator cannot encode H.264 at the offered sizes; API 21 hardware H.264 remains unverified. TCP was checked through optional ADB forwarding because a Mac system service occupied 49152. LAN UDP bytes were decoded live through a Python socket → FFmpeg stdin receiver; direct FFmpeg/FFplay UDP socket playback on that Mac remains unverified. Other devices, direct Wi-Fi TCP, and a stalled-reader physical-device soak were not established. No latency guarantee is made. This is an unencrypted, unauthenticated trusted-network example; UDP has no loss/reordering recovery.
Download the APK and SHA256SUMS, then run shasum -a 256 -c SHA256SUMS (macOS) or sha256sum -c SHA256SUMS (Linux). See the attached VALIDATION.md for exact device/codec results and CHANGELOG.md for changes. The historical v0.1 release is preserved.
Post-publication check: the APK was downloaded again from the public URL, its SHA-256 matched, and adb install -r preserved app data. The downloaded APK passed a 20-second API 36 TCP/H.264 live smoke with 566 decoded / 562 different frames and no capture/sender threads remaining. See POST_PUBLICATION.md.