googlecast / CastVideos-android

Reference Android Sender w/ Framework API: CastVideos-android application shows how to cast videos from an Android device that is fully compliant with the Cast Design Checklist.
Apache License 2.0
340 stars 180 forks source link

Cast button not showing #104

Closed datcorona closed 3 years ago

datcorona commented 3 years ago

image

mohamad-jawad commented 3 years ago

cast button only appears if there are chrome-cast devices nearby, if your tv doesn't has a built-in chrome-cast it will not be considered as available device.

And if you wonder why a tv with no built-in chrome-cast appears in youtube and Netflix dialog apps, it is because these 2 applications uses DIAL protocol to communicate with their tv-version app installed in the tv.

You can reference to this article to know how youtube and Netflix uses the DIAL protocol:

https://www.howtogeek.com/215791/use-your-tv%E2%80%99s-hidden-%E2%80%9Cdial%E2%80%9D-feature-to-cast-netflix-and-youtube-without-a-chromecast/#:~:text=and%20Privacy%20Policy.-,Use%20Your%20TV's%20Hidden%20%E2%80%9CDIAL%E2%80%9D%20Feature%20to%20Cast%20Netflix,and%20YouTube%20Without%20a%20Chromecast&text=Many%20modern%20smart%20TVs%20have,computer%20%E2%80%94%20without%20getting%20a%20Chromecast.

jtromo commented 3 years ago

Please make sure you are running the app using a real device and not an emulator as discovery doesn't work on emulators.

Here is some additional information for integrating Cast: https://developers.google.com/cast/docs/android_sender/integrate?hl=en#initialize_the_cast_context

In addition to verifying that devices are on your network, if you are using your own receiver ID, be sure that either your devices are added or the receiver is published: https://cast.google.com/publish/#/overview