I must use Google Cast SDK via the Chromecast device? - android

Thank you for spending time on my question !
Wish all of you have a good day!
Question:
①Could anybody tell me if i wanna use the Google Cast SDK to do the cast,i must have a Chromecast device?
②Can i do the cast between two android devices such as Phone and Tablet with the Google Cast SDK in my App?
③What does the receiver device in the remote display part mean? A android device with the receiver app or a special device such ac Chromecast?

Could anybody tell me if i wanna use the Google Cast SDK to do the cast,i must have a Chromecast device?
You must have something that is set up to work with the Cast protocol. That includes Chromecast devices and at least some Android TV devices.
Can i do the cast between two android devices such as Phone and Tablet with the Google Cast SDK in my App?
No, at least for any phones and tablets that I am aware of.
What does the receiver device in the remote display part mean? A android device with the receiver app or a special device such ac Chromecast?
There is no "receiver app" (unless you are referring to a custom receiver as being an app). In the Cast SDK, the receiver is running on the Chromecast/Android TV device and is responsible for playing back your requested media.

Related

Chromecast after upgrade - devices no longer detectible

I am creating a Chromecast sender app. Previously a built-in Chromecast version was 1.36.xxx and the Android sender app was able to detect the Chromecast device using the following code:
castContext = CastContext.getSharedInstance(applicationContext);
router = MediaRouter.getInstance(applicationContext);
However, I've just upgraded my built-in Chromecast to version 1.42.xxx (which according to this: https://support.google.com/chromecast/answer/7124014?hl=en-GB is 2nd generation Chromecast) and after this upgrade the Chromecast device is no longer detectible in my Android sender app.
Has anyone encountered this before? Could there be an issue with the Chromecast receiver app not being compatible with 2nd generation devices?
Note: I am using an unpublished receiver app - however, my Chromecast device has been registered with the serial number. Also, this is using the Built-in Chromecast app for AndroidTVs.
We are using com.google.android.gms:play-services-cast-framework:17.1.0
If you have an Android TV, I don't think you can use the firmware for the generation 2 chromecast device. According to https://support.google.com/chromecast/answer/7124014?hl=en the latest version for Android TV is:
Cast for Android TV — Firmware version 1.36154871

Cast V3 not showing Android TV device on network

I have a Nexus Player on my network.
I am updating my Android App to use Google Cast V3. I have published a receiver. When I launch my app and attempt to connect to a Cast device, I only see my Chromecast devices on the network. The Nexus Player does not show up in the dialog as an option to select.
It would appear that the Receiver in the Cast Developer Console is still only seeing the test Chromecast devices, even though the Receiver is published.
Is there further configuration, possibly in the Android Manifest, that needs to be performed to allow connecting to via Google Cast to an Android TV?
It looks like I was impatient. I didn't give the Nexus Player enough time between testing my app and the publishing completed.

Cast api cast button not visible

I am new to Android development and I am trying to use the Android's Cast API. To start I have cloned and used the CastHelloText demo app. But there should be a cast button in the ActionBar/ToolBar which is for some reason not visible. I haven't registered any app to Cast Developer Console, I am just using the project as is, which means I am using the app id mentioned in their project. Does the chromecast device need to be powered on and plugged in and the android phone with the app be near/in front of the tv in order to make the button visible? I am a little confused as there is nothing mentioned anything like this in the documentation.
Your chromecast device should be powered on and on the same network as your phone (same wifi network on both). You do't need to be in front/near the TV as long as both devices are on the same wifi network but I presume you do want to be able to see the TV's screen to see if your app works or not, don't you?

can't find chromecast device using Google's sample app

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.
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)
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.
can anyone share working sampleapp code / receiver.html? (for me to make sure that i didn't make a mistake..)
Thanks!
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.
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 "nobody#google.com" who gave me the app id? or should i register my device again? (is this ok?) i am not sure.... can anyone tell?
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.
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!

Check whether the same app is running on different Android Device through NFC

I have to develop an Android app for NFC enabled Android Devices, If both phones come close listen for the intent that tells that phones are close by due to NFC. Please suggest any solution regarding that.
Thanks in advance.
Since you didn't give enough information to answer your question, I can only guess at what you are trying to achieve.
You can create an application on each device that will send out NDEF messages. If both phones have this application installed, your NDEF message handling Activity will be started via an Intent when another NFC enabled phone with your application running gets close.
You should really read thoroughly the basic documentation provided to you at the android developer guide on NFC here.
For an Android app on ICS (Android 4), you can use an Android Application Record in the NDEF message that you share via Android Beam (preferably as the last record in your message). This will guarantee that only your app will receive the message on the other device (or the user will be directed to the Google Play Store app to install it).

Categories

Resources