Justin Cook
Justin Cook

Reputation: 13

Android App - Turn on "Screen Cast" from ChromeCast App

This is a tricky one and I am guessing it won't be answered as I am not sure its possible. I am working on an application that the customer would like screen cast on to a large TV, with effectively "one click" in a menu on an android device (to a ChromeCast).

Scenario is ChromeCast in TV and on wifi (but not connected to android device). Android application is run by user. User hits "one click" button (which is more like two click), one to start cast device lookup, second selects device. Mirroring occurs

That's pretty much it. Its the same feature as the ChromeCast App "Screen Cast" functionality...to be honest we just want to turn this on from our app, instead of having to load the ChromeCast App.

Thanks.

Upvotes: 1

Views: 935

Answers (2)

MacD
MacD

Reputation: 863

I have the same problem. The only way I have been able to acheive this is by starting the chromecast app and starting screen mirroring from there, and have my app implement a Presentation class. Even though I have been able to fully implement the ChromeCast UIButton, it doesn't work for starting screen mirroring from within the app. Probably an undocumented API or something they might add in the future, but currently I have found no way of doing it only in-app. -edit- Just thought I'd mention it, but a while back (after I/O 15) Google updated the available ChromeCast API's. Using a CastPresentation and the latest callbacks, it's possible to do this.

Upvotes: 0

Ali Naddaf
Ali Naddaf

Reputation: 19094

There is currently no API to turn mirroring on from within an app. Note that on devices such as N5, the mirroring option is also offered from the notification shade so no need to bring up the chromecast app.

Upvotes: 1

Related Questions