Google Cast – Ready to Cast

18 / Mar / 2015 by Simranjit Kour 0 comments

Google Cast is an emerging technology that enables a multi-screen experience to users. It is a screen-sharing technology that allows users to send and control content from their computing devices such as laptops, tablets and smartphones to their TVs screens.

In this blog, we will take you through few steps to begin with the Cast session. The important point to remember is that when you are about to begin the Cast session, both the sender’s and receiver’s devices should be connected to the same WiFi.

There are two ways users can start a Cast session:
1. Connect & Play: As the name suggests, one needs to connect to the Cast receiver first before playing the content.
2. Play & Connect: In this the content gets played first and the user connects to the Cast receiver later.

Few Requirements:
1. Minimum Android SDK version that the Cast SDK supports is 9 (GingerBread)
2. Cast application development involves development of Sender and Receiver applications.
3. Package require:
4. You need to register your application in order to get application ID (which will be used in both “sender” and “receiver” applications).
5. Register your Google Cast device so that it may access your receiver application before you publish it.
6. It can take up to 6 hours to publish your receiver app.

Developing Sender App:
1. Classes used:

  • MediaRouter
  • MediaRouteSelector
  • Cast
  • CastDevice
  • GoogleApiClient


2. Create empty Android application and add the following libraries as dependencies:


3. meta-data element is required in Manifest:

android:value="@integer/google_play_services_version" />[/java]

4. Application’s theme:


5. Adding the Cast Button:

[xml]<menu xmlns:android=""
xmlns:app="" >
<item    android:id="@+id/media_route_menu_item"

Developing Receiver App:
Chromecast is the device which can run the special form of Web Application called “Receiver”

Functions of Receiver Application:
1. An interface to display the app’s content is provided.
2. To control the content (messages) on the receiver device from the sender application.
3. It handles custom messages from the sender application that are application-specific

Types of Receiver Application:
1. Custom Receiver:
The content such as an image gallery or game the app would require DRM, or requires support for media types. You host an HTML 5 app on your servers using the JavaScript Receiver API.

2. Styled Media Receiver:
Google hosted a Pre-built receiver application which is designed for streaming audio and   video content.

3. Default Media Receiver:
You don’t have to register with the Google Cast SDK Developer Console, and you cannot customise any of the UI.

Default Media Reciever ID:

Technical Details:
1. Same WiFi network is to be used for both sender and receiver device.
2. Media Player Library supported types: PlayReady, Widevine.
3. Optimized android apps: Youtube, Netflix, Google Music, Google Movies.
4. Audio formats that support are MP3, Vorbis, Wav.
5. Streaming protocols: MP4, WebM are validated.
6. Image formats that support are BMP, GIF, JPEG, PNG, WEBP.
7. Download the Google Cast Extension for Crome browser.

1. Cast Device is with memory, CPU and GPU limitations and it is also a low-power device so the receiver application.
2. In Receiver app we cannot create Tabs, windows or popups, and there should be nothing on the receiver device screen requiring input. All the interaction is to be done through a sender application.
3. Only one video will be active at a time.
4. Video compositing, manipulation, transformations, rotations or zooming are not supported.

Hope this was useful to the readers.

Happy Casting !!!


Leave a Reply

Your email address will not be published. Required fields are marked *