Reputation: 264
I'm trying to learn how to make a Cast feature, so I started this codelabs tutorial https://codelabs.developers.google.com/codelabs/cast-videos-android/index.html#1
The tutorial gave me 2 projects: app-start (the program I have to modify) and app-done (the complete program) I followed instructions until step 5 where i should add the cast button. It doesn't work, nor in modified app-start nor in app-done.
Other apps with cast feature (like youtube) show my Tv without a problem, but this doesn't.
My doubt is about Cast Developer ID that I'll need in future apps, but it says that for this one will be used a sample one.
Did someone found another problem or I just have to buy my Cast Developer ID?
Upvotes: 4
Views: 1190
Reputation: 139
You have to restart your chromecast after registering it. If you register it, but don't subsequently restart it, you won't see the cast button in the cactool website.
Also, make sure that
Upvotes: 0
Reputation: 1
You are most probably trying to find the button in Emulator or Preview of the xml file.Which you will never find.
Look in the link given below
https://developers.google.com/cast/docs/design_checklist/cast-button#sender-cast-icon-states
You have to understand that cast button has 4 states, and it becomes visible only when there is a cast device nearby.So if you want to check if the button is there or not.First install the apk on your phone than start your chromecast .After this the button will start appearing on your app.
Note: You have to first register your device on the google cast sdk developers console to be able to test unpublished apps.(which is the case when you are running the sample app.)
Upvotes: 0
Reputation: 981
Did you register the chromecast device you have under Cast Receiver Devices in Google Cast SDK Console? If not you'll have to do this, wait for 15 minutes then restart your chromecast. I don't think you can avoid this step. Anyhow, i didn't and had to register my chromecast. Created a dummy application as well. And after this my chromecast started showing up on the discovered devices list.
Upvotes: 2