Skip to content

feat(android): optimize media seekbar sync, clean logs, and fix BLE connection UI state & perf(android): optimize seekbar sync and filter out trivial media progress updates#112

Open
Mudit200408 wants to merge 3 commits into
sameerasw:developfrom
Mudit200408:connect-fix
Open

Conversation

@Mudit200408
Copy link
Copy Markdown
Contributor

perf(android): optimize seekbar sync and filter out trivial media progress updates

  • Implement hasSignificantMediaChange() to perform deep metadata comparisons (playback state, title, artist, album art, buffering state, like status, and track duration).
  • Ignore minor progress elapsed time ticks during comparison to eliminate the CPU-intensive, every-second WebSocket synchronization loop.
  • Significantly reduce battery consumption, CPU overhead, and WebSocket network payloads on the Android client.

feat(android): optimize media seekbar sync, clean logs, and fix BLE connection UI state

  • Media Seekbar Sync & Logging Optimization:

    • Implement hasSignificantMediaChange() to ignore minor progress updates, eliminating the CPU-intensive, every-second WebSocket sync loop.
    • Clean up production logs by removing massive base64 album art strings from MediaNotificationListener printouts.
  • UI & BLE Advertising Sync:

    • Update AirSyncViewModel connection state to be BLE-aware; UI correctly displays "Connected" when Wi-Fi is down but BLE is active.
    • Dynamically pause/resume BLE advertising based on active Wi-Fi connection status.
  • WebSocket & Lifecycle Stability:

    • Enable OkHttp WebSocket client-side pingInterval (10 seconds) to detect half-open sockets faster.
    • Implement a connection watchdog in WebSocketUtil to coordinate with Mac reconnect grace timer.
    • Enable directBootAware for MediaNotificationListener and AirSyncService for reboot robustness.

@sameerasw sameerasw assigned sameerasw and Mudit200408 and unassigned sameerasw May 26, 2026
@sameerasw sameerasw added the enhancement New feature or request label May 26, 2026
@sameerasw sameerasw moved this from Backlog to In review in AirSync Features and Bugs May 26, 2026
…gress updates

- Implement `hasSignificantMediaChange()` to perform deep metadata comparisons (playback state, title, artist, album art, buffering state, like status, and track duration).
- Ignore minor progress elapsed time ticks during comparison to eliminate the CPU-intensive, every-second WebSocket synchronization loop.
- Significantly reduce battery consumption, CPU overhead, and WebSocket network payloads on the Android client.
…onnection UI state

- Media Seekbar Sync & Logging Optimization:
  - Implement `hasSignificantMediaChange()` to ignore minor progress updates, eliminating the CPU-intensive, every-second WebSocket sync loop.
  - Clean up production logs by removing massive base64 album art strings from MediaNotificationListener printouts.

- UI & BLE Advertising Sync:
  - Update AirSyncViewModel connection state to be BLE-aware; UI correctly displays "Connected" when Wi-Fi is down but BLE is active.
  - Dynamically pause/resume BLE advertising based on active Wi-Fi connection status.

- WebSocket & Lifecycle Stability:
  - Enable OkHttp WebSocket client-side pingInterval (10 seconds) to detect half-open sockets faster.
  - Implement a connection watchdog in WebSocketUtil to coordinate with Mac reconnect grace timer.
  - Enable directBootAware for MediaNotificationListener and AirSyncService for reboot robustness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants