The Google Cast SDK includes API libraries and sample application code to help you cast your applications to the big screen. These APIs are documented in the API references, and the sample code is discussed in the Sender Applications and Receiver Applications overviews.
Components
Here's what you need to build a Cast app.
- A sender application, written for the Android, iOS, or Chrome platform which uses the following Cast APIs:
- Android API; for an overview, see Android Sender Applications
- iOS API; for an overview, see iOS Sender Applications
- Chrome API; for an overview, see Chrome Sender Applications
- A receiver application that handles communication between the sender app and the receiver device. You have the following options:
- The Default Media Receiver presented with the Google Cast branding and styling.
- The Styled Media Receiver for which you can develop the styles and branding. See Styled Media Receiver.
- A custom receiver, as described in Custom receiver that implements the Receiver API and handles custom messages from your sender app; it may also interface with the media player types provided through the Media Player Library.
In accordance with the Google Cast SDK Additional Developer Terms of Service, a Cast media application must use the Media Playback Messages defined for the SDK to control media playback on the receiver. Doing so provides the media app with a consistent user experience across platforms and it ensures that a Cast application will support new and future use cases. These structures also support custom data, where appropriate, and an application may define its own messages for commands not supported by the SDK.
Get started
Get set up for development.
- For Chromecast, do the following:
- Install your Cast device and run through the set up instructions.
See the Chromecast Setup instructions.
- Run the Chromecast app on your sender device, following the prompts as directed.
- Install your Cast device and run through the set up instructions.
- For Android TV, see Setting up for development in the Android TV section.
- Review the User Experience Guidelines showing you how to implement a UI that is consistent with other Cast apps.
- Get Resources: API libraries and sample apps to help you get started.
- Register your application.
You will receive an app ID to include with your API calls.
- Develop your app.
- Check out the Google Cast app development overviews:
- Peruse the API references.