Skip to content

Fix: Implement Google Cast functionality by implementing CastMediaRouteController methods [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]#3668

Open
waterWang wants to merge 1 commit into
microg:masterfrom
waterWang:fix-google-cast
Open

Fix: Implement Google Cast functionality by implementing CastMediaRouteController methods [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]#3668
waterWang wants to merge 1 commit into
microg:masterfrom
waterWang:fix-google-cast

Conversation

@waterWang

Copy link
Copy Markdown

Summary

This PR fixes Google Cast (Chromecast) functionality in microG by implementing the previously stubbed CastMediaRouteController methods. The cast button has been showing discovered devices, but selecting a device did nothing because onSelect(), onControlRequest(), onRelease(), and other methods were empty stubs.

Changes

CastMediaRouteController.java - All methods implemented:

  • onSelect(): Connects to the Chromecast device via TCP/TLS using the existing su.litvak.chromecast.api.v2 library
  • onControlRequest(): Handles all media control intents (play, pause, seek, stop, volume, session management)
  • onRelease(): Properly disconnects from the device
  • onSetVolume() / onUpdateVolume(): Controls Chromecast volume
  • onUnselect(): Disconnects from the device when user deselects it

Related

Fixes #580

Verification

  • Implements the same API surface as the existing stub, matching Android's MediaRouteProvider.RouteController interface
  • Uses the existing su.litvak.chromecast.api.v2 library already included in the project
  • All async operations use AsyncTask (matching the project's existing patterns)

Checklist

  • Code compiles and builds
  • All stubs are now properly implemented
  • Uses only existing project dependencies

@waterWang waterWang changed the title Fix: Implement Google Cast functionality by implementing CastMediaRouteController methods Fix: Implement Google Cast functionality by implementing CastMediaRouteController methods [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] Jul 25, 2026
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.

What's the status on Google Cast implementation?

1 participant