Skip to content

Media3 Cast Integration

Guides an agent to add Google Cast support to an Android app using Jetpack Media3 CastPlayer.

Repository
android/skills
Stars
10,278
Licence
Apache-2.0
Files
4 files

What it does

When installed, the agent follows a step-by-step playbook for adding Chromecast-style casting to an Android app with Jetpack Media3: adding the right Gradle dependencies, updating the app manifest with a Cast options provider, wiring CastPlayer or RemoteCastPlayer into a MediaSessionService, and building Compose or View-based cast buttons and player UI. It also covers migrating away from the legacy Google Cast SDK.

Great for

  • Android developers adding Cast support to a media playback app
  • Teams migrating an existing app from the legacy Google Cast SDK to Media3 Cast
  • Developers who want an agent to follow Google's recommended Media3 Cast patterns

Skip it if

  • Non-developers or people who only want to watch or cast media without building an app (the skill edits Android project code, not a media player)
  • Projects that must keep using the legacy Cast SDK, since the skill discourages it unless explicitly requested
  • Apps that are not on Media3 1.9.0 or later and cannot upgrade, because the skill requires that version

Try asking

  • “Add Google Cast support to my Android app using Media3 CastPlayer”
  • “Migrate my app from the legacy Cast SDK to Media3 Cast”
  • “Add a MediaRouteButton to my Compose player screen”
  • “Set up a custom CastOptions OptionsProvider in my manifest”
Step-by-step guide: how to use Media3 Cast IntegrationInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the Apache-2.0 licence and an attribution note.

    media3-cast-integration.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip media3-cast-integration.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip media3-cast-integration.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Specify whether your UI is Compose or View-based so the agent picks the correct dependencies and button setup.
  • Review the Gradle and manifest changes before building, since the skill edits build and configuration files directly.
  • Say explicitly if you need RemoteCastPlayer or a custom OptionsProvider, because the skill defaults to CastPlayer and DefaultCastOptionsProvider.

What's inside

  • references/android/media/media3/cast/create-castplayer.md
  • references/android/media/media3/cast/customize-castoptions.md
  • references/android/media/media3/cast/index.md
  • SKILL.md

Redistributed unmodified from android/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.