2
votes

Using this code, https://github.com/googlecast/cast-android-sample, I build android chromecast sample sender application.

And I also modified the code to use my appID, and uploaded whitelisted URL (already registered to Google).

But I can't find the chromecast device from this sample app. I mean, onDeviceAvailable() is not getting called. And I don't see any suspicious error / log while i am running the app.

  1. is there anything that i need to try to see why i can't find the chromecast device? (BTW, youtube app in the same device can find the chromecast device)

  2. another question, which may not be related to the main question. registering the device to have app_id, and whitelisted url is not mandatory step to find the chromecast device from app. right? I guess that registration step is needed for media stream not for device discovery.

  3. can anyone share working sampleapp code / receiver.html? (for me to make sure that i didn't make a mistake..)

Thanks!

4
You may want to check out this Answer: stackoverflow.com/a/17962215/48735Nick Spacek
I did it already, but i wonder how i can confirm that i am using the correctly registered app idSFStorm
Yes indeed, that would be very helpful. Hopefully some method will exist by the final developer release.Nick Spacek

4 Answers

0
votes

Did you try the Tic-tac-toe Android sample too? These two apps are using different ways of displaying the list of ChromeCast devices to the user.

Both sample apps work just fine for me. I used the default reciever.html and only added my own app id.

Technically it is not necessary to register the device to discover it on the network. You can try this app to find all DIAL devices: https://github.com/entertailion/DIAL However, the Google Cast API wraps the DIAL discovery and they might be enforcing the app id requirement.

0
votes

Ok, I think i found the cause (with help of you guys, thank you), but that does not mean that i can solve this.

TicTacToe is working because it does not need my app id. it's using something generally working (like what youtube / netflix is using).

I tried "TicTacToe" as app id for cast-android-sample app, and now it can see the chromecast device. I tried my app id to TicTacToe and it can't show the web page on the screen. (of course i modified my receiver page that is whitelisted)

From above 2 test results, i am confident that there is something wrong with my app id. How to solve? should i reply to "[email protected]" who gave me the app id? or should i register my device again? (is this ok?) i am not sure.... can anyone tell?

0
votes

Assuming that you've also changed the settings on the Chromecast to send the serial to Google, then you may just need to wait a few hours after doing so. I was having the same issue where my device wouldn't show up with the sample app, after waiting a few hours after changing that setting it showed up just fine.

0
votes

Did you try rebooting your device by going into your Chromecast settings via the Chromecast Android app or the Chromecast app for your computer?

I spoke to the Chromecast support team because I was having the same issue, and the reboot got it working.

To make sure that your device is whitelisted, you should be able to access this page from chrome (from a computer on the same network as your chromecast device):

<IP address of chromecast>:9222

If you can access that page, then it should work!