Google Cast Receiver Application Id property

Official Content
This documentation is valid for:
Receiver Application Identifier which enables media casting by using Google services.

Description

This property allows the developer to enable Google Cast support for media playback (audio in background, images or videos), which value must be the application identifier that runs on the Google Cast receiver device when casting from the application that has the property set.

How does it work?

When the developer sets this property, the app is considered as a sender, showing the cast icon in the right-upper corner when a cast device is detected, and the end user can share media content with a receiver (e.g. Chromecast device connected to a TV).

GoogleCast - Cast icon

GoogleCast - Result

What is the Receiver Application Identifier?

The cast architecture has two main components:

  • Sender application - The application that shares its content with the cast device.
  • Receiver application - The application hosted on the cast device that receives content from the sender application.

GoogleCast - Application receiver and sender

The receiver is a particular web application executed in the cast device. Unlike a typical web application, the receiver is not identified by a URL. It uses a unique identifier provided by Android through its developer console when the application is registered.

There are three kinds of receivers:

  • Default Media Receiver - Provided by Google. It does not allow customizing its aspect and is used for testing purposes. Its identifier is CC1AD845.
  • Styled Media Receiver - It is a flexible version of the previous one, but only allows customizing the UI through CSS.
  • Custom Receiver - It allows customizing every aspect of the receiver using HTML, JavaScript, and CSS, and even to create your protocol to communicate with the cast device.

For the last two receivers, you must get the identifier once you've registered it in the developer console.
Then you can enter this AppID in the GeneXus property, and your application is available to communicate with it.

Notes

  • For testing purposes, you can use the default media receiver application ID: 'CC1AD845'.
  • Styled Media and Custom receivers must be developed using the tools mentioned above. See examples and How to register it.
  • It can be helpful to follow this diagram to choose which receiver is more convenient for your application.
  • At the moment, it is only available for Android Smart Devices and Audio external object (including the Audio Player). It is highly recommended to set the ContentType and StreamType fields of the MediaItem SDT to appropriate managing the resources by the receiver app and the cast device.

Run-time/Design-time

This property applies only at design-time.

How to apply changes

To apply changes made by this property, do a Build All.

Availability

This property is available since GeneXus 15.

Scope

Objects: Main Smart Devices
Platforms: Smart Devices(Android)

See Also