Skip to content

feat: Implement lightweight WebSocket server and receiver service - #3

Merged
ClausValcaTD merged 2 commits into
mainfrom
feat/websocket-server-receiver-7474672050440416523
Oct 16, 2026
Merged

ClausValcaTD merged 2 commits into
mainfrom
feat/websocket-server-receiver-7474672050440416523

Conversation

@ClausValcaTD

Copy link
Copy Markdown
Contributor

Implement a background WebSocket server service on Android TV compatible with minSdk 19 (KitKat).

Key changes:

  1. Added org.java-websocket:Java-WebSocket:1.5.4 dependency.
  2. Implemented LibreCastServer.java listening on port 8080 (0.0.0.0) with single active client connection management and raw binary ByteBuffer chunk receiving for high throughput and low GC overhead.
  3. Implemented ReceiverService.java managing LibreCastServer lifecycle, acquiring WifiLock (WIFI_MODE_FULL_HIGH_PERF) and WakeLock (PARTIAL_WAKE_LOCK), and broadcasting status updates.
  4. Implemented NetworkUtils.java to resolve local Wi-Fi and Ethernet IPv4 addresses.
  5. Updated MainActivity.java, activity_main.xml, and strings.xml to start service and display real-time server address (ws://:8080) and connection state.
  6. Added unit tests in LibreCastServerTest and NetworkUtilsTest.

PR created automatically by Jules for task 7474672050440416523 started by @ClausValcaTD

Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Refactor package name and applicationId to com.m5dev.librecast
- Add Java-WebSocket 1.5.4 dependency compatible with minSdk 19
- Implement LibreCastServer extending WebSocketServer on port 8080 with binary video streaming support and single client enforcement
- Implement ReceiverService acquiring WifiLock and WakeLock and broadcasting status updates
- Implement NetworkUtils to resolve local Wi-Fi / Ethernet IPv4 address
- Update MainActivity and layout to display server and client connection status
- Add unit tests for NetworkUtils and LibreCastServer

Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
@ClausValcaTD
ClausValcaTD merged commit 15a0430 into main Oct 16, 2026
1 check passed
@ClausValcaTD
ClausValcaTD deleted the feat/websocket-server-receiver-7474672050440416523 branch October 16, 2026 16:16
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.

1 participant