Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

media3-cast-integration

Skill by android

Implements Google Cast support in Android apps using Jetpack Media3. It covers dependencies, manifest updates, OptionsProvider setup, and CastPlayer or RemoteCastPlayer playback in Compose and View UIs. It is for developers adding Cast or migrating from the legacy Cast SDK.

  • Score 94
  • 11k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install media3-cast-integration

Built from the published package, never by AI.

git clone --depth 1 https://github.com/android/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/media/media3-cast-integration ~/.claude/skills/media3-cast-integration

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install media3-cast-integration in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides an AI assistant through adding Google Cast support to an Android app with Jetpack Media3. It covers build dependencies, the manifest entry for the Cast options provider, and the MediaSessionService setup. The skill says to use CastPlayer by default and RemoteCastPlayer only when requested. It also covers MediaRouteButton placement and PlayerView rebinding for both Compose and View-based screens.

The source requires Media3 version 1.9.0 or higher and notes that the legacy Google Cast SDK is in maintenance mode. It includes a migration path from the legacy Cast SDK that keeps old files until the user asks for cleanup. It is aimed at Android developers adding Cast or moving an existing legacy Cast integration to Media3 Cast.

Written from the project's SKILL.md and checked against it.

What it can do

  • Dependency setupAdds media3-cast and related Media3 dependencies at version 1.9.0 or higher.
  • Manifest updateDeclares the Cast options provider in the manifest and checks the INTERNET permission.
  • OptionsProvider configurationUses DefaultCastOptionsProvider by default, or a custom provider when requested.
  • CastPlayer setupInitializes ExoPlayer and CastPlayer in a MediaSessionService and passes CastPlayer to MediaSession.
  • RemoteCastPlayer transferMoves playback state between local and remote players when Cast sessions change.
  • Compose UI integrationAdds a MediaRouteButton composable and the Material3 Player composable.
  • View UI integrationRebinds PlayerView on device info changes and swaps CastButtonFactory for MediaRouteButtonFactory.
  • Legacy cleanupLists steps to remove legacy Cast SDK code, to be done only when the user asks.

What you need

  • Jetpack Media3 version 1.9.0 or higher
  • App-level build file (Kotlin DSL examples)
  • Android app with a MediaSessionService or MediaLibraryService

Try asking

  • Add Google Cast support to my Android app using Media3 CastPlayer
  • Migrate my legacy Cast SDK code to Media3 Cast
  • Add a MediaRouteButton to my Compose player screen

Good to know

  • Requires Jetpack Media3 1.9.0 or higher. Cast is not available in lower versions.
  • The legacy Google Cast SDK is in maintenance mode and should not be used unless requested.
  • Legacy files and dependencies are removed only when the user explicitly asks.
  • RemoteCastPlayer is used only when explicitly requested.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: media/media3-cast-integration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB
  • references/android/media/media3/cast/create-castplayer.md17 KB
  • references/android/media/media3/cast/customize-castoptions.md6 KB
  • references/android/media/media3/cast/index.md2 KB

Alternatives to media3-cast-integration

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

media3-cast-integration: common questions

Does this skill support the legacy Google Cast SDK?

The source says the legacy Cast SDK is in maintenance mode and should not be used for new Cast setups unless explicitly requested. For migrations, it says to add Media3 Cast first and keep legacy code until cleanup is requested.

Which Media3 version is needed?

The source requires Jetpack Media3 version 1.9.0 or higher. It states that Cast is not available in lower versions.

Does it work with both Compose and View-based UIs?

Yes. The source has separate steps for Compose UI using the Material3 Player composable and for View-based UI using PlayerView and MediaRouteButtonFactory.

How do I install media3-cast-integration?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is media3-cast-integration free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is media3-cast-integration safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to media3-cast-integration?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

media3-cast-integration Install

Add to stack

Loading.