I'm looking through the chromecast api and trying to figure out whether I can cast an entire android app on to the screen, or only media within that app. Does anyone know the answer to this? I want to make sure if I build a cast app, that the entire app can be sent to a tv screen, not just media contained within it.
2 Answers
No, you cannot cast an entire Android app to the ChromeCast device. The mobile app and the ChromeCast app are two different apps. The app running on the ChromeCast device is HTML. The app on your mobile device can send commands to the app running on the ChromeCast device. These commands can be used to play media or for handling custom messages.
-
Ah, so how did the do the Chromecast tic-tac-toe android sample?– mheaversCommented Sep 4, 2013 at 19:33
-
2The Tic-Tac-Toe example is actually two applications. There's a native Android one and an HTML version (which runs on the Chromecast). The applications communicate over a pipe that is opened by the Cast SDK. You can see all of the source code over at the google cast github.– NathanCommented Sep 6, 2013 at 19:56
You can do this: you have to use the Presentation API to display your content, and the only way to get this done right now is to start the ChromeCast app and apply screen mirroring. Then you can see only the contents of your Presentation class on the chromecast ... but so far I haven't been able to start screen mirroring solely from the ChromeCast UIButton within my app.