media3-cast-integration

media3-cast-integration is a skill for Claude Code from android/skills. It costs 68 tokens per session (2,308 once invoked), scanned A, original, Apache-2.0.

An Android development guide for adding Google Cast playback with Jetpack Media3, the Android library for media playback. It covers setup for Compose and traditional View-based screens.

In plain words
What is it for?
Use it to add Google Cast to an Android media app, configure the app manifest and Cast options, and manage local or remote playback with Media3 players.
Why use it?
It explains the dependencies and app configuration needed for casting, reducing guesswork when adding Cast support or moving away from the older Cast SDK.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the android-skills plugin — 22 skills shipped together

About the project

Android skills is a collection of modular instructions and resources that help AI agents handle specialized Android development tasks. Android developers use it to guide coding agents toward Android-specific workflows, and the catalogue lists some of its skills and plugin.

android/skills · 7,205 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/android/skills/media3-cast-integration
Any agent
npx skills add android/skills --skill media3-cast-integration
Clone the repo
git clone --depth 1 https://github.com/android/skills

Made for: Claude Code.

Or install android-skills, the plugin that ships this one along with the rest of its 22 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for media3-cast-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/android/skills/media3-cast-integration.svg)](https://agentmods.dev/skills/android/skills/media3-cast-integration)
Your own site
<a href="https://agentmods.dev/skills/android/skills/media3-cast-integration"><img src="https://agentmods.dev/badge/skills/android/skills/media3-cast-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,308 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.02308
Opus 5 $0.00034 $0.01154
Sonnet 5 $0.00014 $0.00462
Haiku 4.5 $0.00007 $0.00231

Measured 6d ago against content hash 351a49c084f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

media3-cast-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

media/media3-cast-integration/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prerequisites

  • Jetpack Media3 version must be >= 1.9.0. Cast isn't available in lower versions.

Glossary

  • CastPlayer : Media3 Player that controls playback on both local and remote Cast devices.
  • RemoteCastPlayer : Media3 Player that communicates with a Cast receiver, only used for remote playback.
  • Google Cast SDK: Legacy casting SDK in maintenance mode, superseded by Jetpack Media3.
  • OptionsProvider : Interface providing configuration options to initialize GMS CastContext.

Common guidelines

Step 1: Set up dependencies

To complete this step, you MUST ensure the following:

  • In the app-level build file, declare the media3-cast dependency version 1.9.0 or higher.

    implementation("androidx.media3:media3-cast:1.11.0")
    
  • Ensure required Media3 dependencies are present:

    • androidx.media3:media3-exoplayer
    • androidx.media3:media3-session
    • androidx.media3:media3-ui-compose
  • If the application uses legacy Views, add media3-ui.

  • Enforce the same versions across all Media3 dependencies.

  • Use configurations in "Add build dependencies" section of Getting started with CastPlayer as the source of truth.

  • For apps without an existing Cast integration:

    • Verify legacy Cast SDK (libs.play.services.cast.framework) is absent.
  • If Migrating from Legacy Cast SDK:

    • Add Media3 Cast dependencies first.
    • Keep existing legacy dependencies untouched at this stage to prevent compilation errors.

Step 2: Update the manifest

To complete this step, you MUST ensure the following:

  • Inside the manifest's <application> tag, declare the Cast options provider.
  • Use DefaultCastOptionsProvider by default. See the "OptionsProvider" section in Getting started with CastPlayer.
  • Declare a custom OptionsProvider only if explicitly requested. See Customize CastOptions.
  • Ensure INTERNET permission is present. Don't add any unnecessary permissions.
  • If Migrating from Legacy Cast SDK:
    • Don't delete existing custom options provider files or manifest entries.

Read the full file on GitHub · 234 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 234 lines · 68 tokens per session scan A 351a49c084f0

Subscribe to this mod's changes

media3-cast-integration is a skill published in the GitHub repository android/skills (7,205 stars, last pushed 4d ago), licensed Apache-2.0. It adds 68 tokens to every session and 2,308 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

google-mobile-ads-android-migrate-to-next-gen

Migrates Android applications from the old, legacy Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) to the new GMA Next-Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk). Provides comprehensive mapping tables for imports, classes, and method signatures to help determine…

google/skills · 105 tokens

developer-device-platform-basics

Provides guidance and instructions on managing remote devices on Developer Device Platform (DDP). Use when reserving remote Android devices, establishing connection tunnels, checking session status, or extending/cancelling leases. Don't use for iOS or local device/hardware inquiries.

google/skills · 57 tokens

google-mobile-ads-validate

Validates a project's Google Mobile Ads (GMA) SDK integration for iOS, Android, or Unity projects. Use when conducting a full pre-launch audit of an app that integrates GMA SDK or when validating any individual GMA SDK integration checks, such as when validating ad unit IDs and ad formats, SKAdNetwork IDs, mediation…

google/skills · 84 tokens

google-mobile-ads-interstitial

Provides instructions for implementing, integrating, or configuring Google Mobile Ads (GMA) SDK interstitial ads in Android, iOS, or Unity mobile applications. Use when the task involves setting up interstitial ads. Don't use for "rewarded interstitial" ads.

google/skills · 60 tokens

google-mobile-ads-rewarded

Provides instructions for implementing, integrating, or configuring Google Mobile Ads (GMA) SDK rewarded ads in Android, iOS, or Unity mobile applications. Use when the task involves setting up rewarded ads. Don't use for "rewarded interstitial" ads.

google/skills · 59 tokens

offensive-mobile

Mobile (Android + iOS) application penetration testing methodology. Covers static analysis (apktool/jadx for Android, class-dump/Hopper/IDA for iOS), dynamic instrumentation with Frida and Objection, SSL pinning bypass strategies, root/jailbreak detection bypass, deep-link / URL-scheme abuse, exported component…

SnailSploit/Claude-Red · 185 tokens