Customer Receiver: Unable to Cast to Device - chromecast

I'm having trouble doing a simple "hello-world" with a Custom Receiver.
I have really simple sender and receiver apps.
Sender app: http://chromecasttest.boxofsoap.com/
Receiver app: http://chromecasttest.boxofsoap.com/cast
I've tried casting to my Chromecast device using the Google Cast Beta
extension for Chrome Canary.
Whenever I visit the sender app URL and try casting to my device, I always
get a "Unable to cast to device error":
pasteboard.co/1pn6kEel.png
Looking at the console I usually see vague errors like "channel_error"
or "timeout".
What am I doing wrong??

#AliNaddaf - Thanks again for your help, after some debugging I found out that the issue was related to the server that was serving the receiver app.

Related

chromecast, integrate a sender app to a receiver app

I am having trouble with google cast receiver app CastHelloVideoPlayer, which can be found from github/googlecast.
I followed the Setup Instructions specified on the github.com/googlecast/CastHelloVideoPlayer webpage,
......
Uploaded the receiver.html of CastHelloVideoPlayer to my github account,
https://github.com/PhilSSOO/myCastHelloVideoPlayer
Registered an application on the Developers Console. I got an app ID 3BFFF41A. I chose NOT to publish my app.
Registered the serial # of my chromecast device in the developer console.
I tried but failed to send my chromecast serial number to Google. My setup process didn't bring me to "send your serial number " step.
Rebooted chromecast ...... But I didn't see any indication that my chromecast picked up any changes.
Entered the app ID 3BFFF41A into my sender application, which is app_done of Cast iOS codelab tutorial,
https://codelabs.developers.google.com/codelabs/cast-videos-ios/#0
(The app_done works fine --- able to cast videos to my TV via a chromecast device --- so I assume this sender app is communicating well with my chromecast)
(continuing the above 7) To be exact, I added 3BFFF41A to appDelegate.m file
......
GCKCastOptions *options =
[[GCKCastOptions alloc] initWithReceiverApplicationID:3BFFF41A];
......
But I got an error,
invalid digit 'B' in decimal constant
I doubt this is not the way to integrate a sender app to a receiver app. My search on the internet didn't get me through.
Please Help.
Phil
initWithReceiverApplicationID expects the app ID to be a string.

Chromecast receiver "unavailable" on localhost

I have followed the steps here:
https://developers.google.com/cast/docs/developers
and am using this sample sender code:
https://github.com/googlecast/CastHelloVideo-chrome
to get started creating a chromecast receiver app. I have my app id and when I change the sample to use my app id it returns "unavailable" in the receiverListener event. When I use the default media receiver app id it works just fine.
Is there something I am missing?

Chromecast styled receiver app ID

I am unable to cast with my styled receiver from chrome browser.
I have an unpublished styled receiver chromecast app. The "preview" button works fine. My testing device is registered with status "ready for testing". The send serial number checkbox is checked from my android app (OS X app never finds chromecast, so I cannot verify with another app).
Setting the app ID to be my application ID (which seems to be an 8 digit number in the SDK developer console) throws a session error when I try to connect. Changing this back to the default app ID has success. I registered a second identical application and tried with that ID as well.
What could have gone wrong? I am unable to connect to the debugging console, but I read on SO that you need a custom receiver (not styled receiver) to connect.
I am able to connect to the custom receiver as defined in this sample receiver as well.
Is there no testing for styled receivers?
Note that there is one oddity about my setup, and that is that the chromecast is connecting to a wifi network that has been shared by my macbook, not a normal router.
You don't need a custom receiver to be able to debug, using your own Styled receiver is adequate (you basically need to have your own App Id). I would suggest you double check your serial number; take a photo and enlarge that to make sure it was read correctly.
Solution was use a router instead of sharing internet access via Wi-Fi from my macbook. Re-checked the send serial number box, restarted device and everything worked.

Azure Notification Hub Register iOS Device Always Returns Unauthorized

Early on in developing an iOS app with Xamarin, another developer and I got push notifications working for it using the Azure Messaging Component. It's a few months later now, and sometime between then and now, the push notifications stopped working. The code is still basically the same as before (which is nearly identical to the example code for the component), it was just moved to its own class for maintainability.
On Hub.UnregisterAllAsync(DeviceToken, error =>, error is:
The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
On Hub.RegisterNativeAsync(DeviceToken, tags, error =>, error is:
URLRequest failed for <NSMutableURLRequest: 0x167dbd80>
{ URL: https://[our namespace].servicebus.windows.net/[our hub name]/Registrations/?$filter=deviceToken+eq+'[long token]'&api-version=2013-04 }
with status code: unauthorized
We tried a new hub, and a new namespace with a new hub, but without luck. I've rolled back the changes we've made since it was working, but with no luck there either. The same error happens on multiple devices, on multiple networks. It never shows any errors in the portal for APNS, so I'm assuming this is something with authenticating to the Hub itself. What is really weird is that a Windows Store app that we wrote to test this registers and receives notifications using the same credentials without any issue. Can anyone point me in the right direction on this? The error messages above aren't very helpful.
It turns out that the test devices all had the automatic date and time synchronization turned off. The iPad I was primarily testing with was only off by about 20 or 30 seconds, so I didn't notice it was off. Another question involving the same thing with a Windows or Windows Phone registration clued me into it, but I can't find the link to it now. Apologies for that, thanks to whoever that was!
Looking at the API, it makes sense why it's so sensitive to this. It uses the date and time to generate the SAS Token, thus the unauthorized response when the time is just a few seconds off.

MediaRouteHelper.buildMediaRouteSelector doesn't show me my chromecast when I send the app name parameter

I have a weird situation, My app was working fine and I was able to select my chromecast device and see my receiver application without problem, so my chromecast is whitelisted.
Now my app doesn't work, the chromecast icon is disabled and I can't select my device.
Basically this line was working fine
mMediaRouteSelector = MediaRouteHelper.buildMediaRouteSelector(MediaRouteHelper.CATEGORY_CAST, getResources().getString(R.string.app_name), null);
but now it doesn't. Why? any ideas?
But this line works fine:
MediaRouteHelper.buildMediaRouteSelector( MediaRouteHelper.CATEGORY_CAST)
Of course I can't see the receiver app (html).
I am thinking maybe my chromecast is not whitelisted, just like the beginning when I started with the development.
Any ideas?
Is there a way to check if my chromecast is whitelisted or not?
Thanks in advanced.
Can you access your Chromecast device through your Chrome browser via:
http://[IP address of your Chromecast device]:9222?
If yes, then the device has been successfully whitelisted.
Make sure the "Send this Chromecast's serial number when checking for updates" option is checked in the Chromecast setup. This option gets cleared if you do a factory data reset.

Resources