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.
Related
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
I have an Android app which runs unattended on a tablet running Android 6.
I've uploaded an alpha version to Google Play and install it on an Android tablet.
I've remain logged-in to the Google Play on the tablet and auto-update is turned on.
Yet, my app is running now for 2 days since I've pushed an update to the app and the app still did not update.
If I open Google Play on the tablet I see the new version.
Is there anything else I need to do to have the app update automatically without use open Google Play and press Update?
Apps restart when they get updated. Because of this, Google Play tries to avoid auto-upating apps when they are running in the foreground as this is a bad user experience, the app restarting while the user is using it. This is one possible reason.
Another reason is Google Play by default only updates apps when the device is plugged into power and connected to wi-fi, to avoid draining the battery and using up the user's mobile data. This could be another reason.
However, if the app is not in the foreground and the tablet is plugged into power and on wi-fi, and autoupdate is turned on it should update within 24 hours. If it doesn't this is probably a bug. You should take a bug report and contact Google Developer support using the Google Play console.
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?
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.
Discovery of Chromecast devices using Android MediaRouter APIs is not working as expected with latest mediarouter support library (version 19) and google play services version 4.2.43.
I'm using Cast Hello Text sample app for this issue. It can be found here: https://github.com/googlecast/CastHelloText-android.
I have my chromecast device plugged into the TV and in the same network as the Android device (Sender).
The app comes up and finds the Chromecast device. I override some of the relevant MediaRouter.Callback methods, so I see the onRouteAdded() being called.
Later, I unplug the device from my TV. I expect to get a onRouteRemoved() event. But this never happens.
The app still displays the cast icon. On selecting the device from the cast icon, the app attempts to connect to the device and fails. Now I get onRouteUnSelected() and onRouteRemoved() events and the cast icon disappears.
On plugging back the device to my TV and once the device is displaying the home screen, I expect to get a onRouteAdded() event. I do not get this event even after waiting for a few minutes.
This was working as expected in mediarouter library version 17 and with the preview google cast SDK.
So has something changed in terms of when these events are fired?
what is the right way to find out when a chromecast device is added and when it is removed? I plan on using a custom UI with MediaRouter APIs to display the cast icon and the device list.
There is a bug in the latest version of Android SDK/Play services that causes the behavior you are seeing. This will be fixed in the next release of SDK and Google Play services.