Cristian
Cristian

Reputation: 47

Play android application content to chromecast

I have an Android application capable of flipping photos received by an internal FTP server in the main activity. Following the step-by-step Google example, I have successfully added the Chromecast button to the application and I can select the available cast devices.

Now, the ultimate goal would be to cast the activity playing the photos to the selected Chromecast device. So far, when the cast device is being told to launch the application, it accesses the URL configured in the Google Cast SDK Developer Console. Am I supposed to take care of the creation of the video content to be served by that URL? Or is it possible to play my application activity directly?

Upvotes: 1

Views: 725

Answers (1)

Ali Naddaf
Ali Naddaf

Reputation: 19044

When you start an application on Chromecast, the cast device loads the html page that you had configured for the app and after that point, it is just an HTML page; if you want to show an image with a certain url, you need to pass that url to your receiver (using the cast sdk) and that url should point to your image (i.e. your media content needs to be served by a web server, being it in the clouds or running on your phone inside your sender).

You can also use the "Presentation" apis and use the cast device as a second display and show whatever you want on the cast device following this approach.

Samples of both approaches can be found on our GitHub repo. You can also learn more about cast and how it works on here.

Upvotes: 1

Related Questions