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
Related
I am new to beacons, but I am trying to understand the pros and cones of iBeacons for an app on iOS and Android:
I understand that on iOS:
Apps in the background can monitor for BLE/bluetooth
Apps in the background can be opened through a local notification which the user can press and thereby open the app.
But this still leaves two important use cases I am unsure about:
1)
When the app is installed, but not running at all, is it possible to have the app launched or at least a message asking to open the app on:
iOS?
Android?
2)
If the app is not installed - is it possible to prompt the user to download an app like EddyStone beacons on:
iOS?
Android?
Yes, when an app is not running, you can detect beacons and have them send notifications to a user on both iOS and Android. Tapping on the notification will bring the app to the foreground. There are a couple of platform-specific distinctions:
Android: A third party library such as the open source Android Beacon Library must be used to trigger background scanning even when the app has not been launched by the user. (Technically the app is running when doing this scanning, but only the beacon scanning parts of it.) On an Android device only, you can fully launch the app to the foreground on beacon detection instead of just sending a notification. Background detection works well with both iBeacon and Eddystone.
iOS: Background detection works much more quickly with iBeacon than Eddystone.
It is not possible to use beacons to prompt users to install your app on iOS using either iBeacon or Eddystone.
On Android, it is possible to use Google Nearby to prompt a user to install your app on newer Android 4.4+ devices. (This works with both iBeacon and Eddsystone, if you have your beacons properly configured with Google.) That said, a number of conditions must be satisfied for this to work:
Google Nearby must be enabled in Google settings
Location must be enabled
Bluetooth must be on
Google Play Services v.10.0 must be installed on the phone (earlier version 9.8 available through November 2016 had Nearby notifications disabled.) Note that most phones in China and many other countries do not have Google Play Services at all.
You must register your beacons with google and set up Nearby app intents.
Read more about the basics of Nearby here and more about using App Intents to send users to the Google Play Store to install your app here.
http://developer.radiusnetworks.com/2015/07/22/how-to-push-messages-without-an-app.html
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.
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.
I am working with chromecast in android. I did almost every thing(according to me.)
I have whitelisted my chromecast Device.
Got AppID.
But still I am unbable to discover my chromecast device. I have follow this link How do I discover a Chromecast device using Android? as well as this https://developers.google.com/cast/cast_2nd-screen_app_tutorial. In chromecast app I have also checked this box Send this Chromecast's serial number when checking for update. What I am missing I cant understand.