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.
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.
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.
Related
Use case: I have security cameras around my home (on zoneminder). When an event is triggered (someone walks by the camera) I want to have some screen nearby the door and ideally push a notification to devices (hopefully android tablets) to display the camera view on all these connected devices.
I'm happy developing my own app if necessary (even better if such an app already exists). But does Android support this functionality to allow an app to open based on an external event (some message to the app)? I've personally never seen it (phonecall is the one exception). I'm sure listening for events is easy, but I can see there being a rule not to allow apps to 'force open' in this way.
If there is a way, if you could point me to the class that would support this I would appreciate it. Thanks!
(If you have any other solutions for my use case, I'd be happy to hear them. Unfortunately, I'd like these tablets to run other apps too, so keeping the 'camera app' open constantly isn't really a solution for me.)
I've got an application with Exoplayer. Works perfectly.
A request came to implement the "Cast to TV" (like the Apple TV Icon you get at the bottom when an Apple TV is present in the same network)
I've been trying to read up on this for Android, though seem to get lost be different information by different contradictions.
Some talk about a sender and receiver app, but i'm pretty sure this would not be needed as I have seen other apps where i can just push to the tv without having to install other software on the tv or whatever. (I understand that these TV's must comply to some certain standard)
Surely there is a way to:
Put a cast button at the top
Press it and show a selection screen of devices available
Then tell the player to "cast to tv"
(simply said of course)
Does anyone know of clear information and/or sample?
Please don't link to the Android pages, because that's one of the reasons I got lost in this matter.
https://developer.android.com/guide/topics/media/mediarouter.html
has no mention of needing another app.
What is allShare? Only for samsung or is there a universal standard?
Thank you to the person who will take the time to explain and provide some insight to where to start.
Does Google Cast support screencasting from Android devices? For example, could we implement it into our tablet app to broadcast our screen to a receiver device running on a bigscreen TV, for demonstrations and events?
This post mentions creating a mini-server on an iPhone to serve content from. Would it be possible to create a mini-server within our Android app that captures and broadcasts the screen?
Google Cast doesn't support screen casting. However, you could certainly create a tiny web-server (such as http://tjws.sourceforge.net/) which serves images you've created. (Remember to shut it down when the user turns off the screen -- to save power) You should even be able to use the Styled Receiver for that.
No, Google Cast only supports streaming to a Chromecast, from any Chromecast supported device.
Also the "app" must be chromecast capable, so you would have to do what the post suggests, create your own app that acts as the middle-man in-between your device and your chromecast-supported-TV.
Simple Alternative For Screen Sharing:
On the other hand, a faster solution (if all you need is share your screen) is to use Droid#Screen and mirror your computer's display to the bigger screen or use join.me so users seeing your screen can also see your Android device.
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.
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.
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.
I've been reading the AnyMot protocol and the fling is mentioned wherein a second screen app can launch the YouTube app. Could a tablet application launch say the Flixter, Pandora or the Goolge Music app without it being a remote control emulator. If so would the AnyMot protocol be what's used?
Thanks
Anymote is a very much adequate for that. If, you want to do an app like "Able Remote", you'll need to put a small app on the TV which will tell you what apps are present. But for what your asking, it's doable w/ just Anymote.