Reputation: 51
I'm developping an android App and now I would like to add a screen mirroring button which display the same screen on a tv equipped with a chromecast.
I found a way : chromecast remote but there given sample is in beta, crashing when I click on the button and the development seems to be hard time-consuming (because I don't need to create new view with 'presentation' if I just want to mirror).
A second way should be to launch the google home mirroring service, that just work really well. But I don't find a way to call it from my app..
In short, I have no more clue, if someone have any idea that would be nice.
Thanks for your answer !
Upvotes: 1
Views: 1701
Reputation: 404
Resurrecting old question but for those who are still looking for a solution to mirroring activity directly to chrome-cast check out: castscreen I had to edit the library to enable initiation of the cast service from Activity A and keeping the connection through multiple activities(B,C,D). Tested on android 6.0 onwards
Upvotes: 0
Reputation: 166
This sample works for me. May be you might be missing to add your AppID. Based on setup instructions, you need to have your own AppID. Refer to below setup instructions copied from the example:
Setup Instructions:-
Please share the error logs if you are unable fix it.
Note: The Remote Display API is compatible with Cast SDK v2 only, not v3.
Upvotes: 0
Reputation: 51
I have got an idea, but it's purely theoretical.
Is it possible to record the tablet's screen, encode this in a stream, make a server (with volley by example) and give the local ip adress to the mediaInfo of the chromecast receiver, so it can display my screen on a TV ?
Well, I hope you can see what I mean, I'm trying this idea until I have an answer.
Upvotes: 1