I am currently integrating Google Cast into my Android application. Despite following the documentation and ensuring my setup matches the requirements, my app cannot discover the receiver device. However, other applications like YouTube and Netflix can detect and cast to the device without any issue.
Issue Details:
Sender App Details:
- I’m using the Google Cast SDK in my Android app.
- App ID:
<Your App ID>(orCC1AD845for the Default Media Receiver). - Wi-Fi network: Both sender and receiver devices are on the same Wi-Fi network.
- Permissions in
AndroidManifest.xmlinclude:<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
Receiver Device Details:
- Receiver: Samsung Smart TV (model WA65C) with Google TV.
- Receiver has been whitelisted on the Google Cast Developer Console using its serial number.
- TV is rebooted after registration.
Application State:
- App registration status on Google Cast Developer Console: Unpublished.
- Receiver type: Styled Media Receiver.
- The "Intent to Join URI" is configured as
https://<your-app-server>.com/receiver.
Error Description:
- When I attempt to discover devices, the following happens:
- Initially, it displays: "Looking for devices."
- Then: "Ensure the other device is connected to the same Wi-Fi network as this phone."
- Finally: "No devices available."
- No receiver devices appear in the Cast dialog.
- When I attempt to discover devices, the following happens:
What I Have Tried:
- Ensured the receiver device is powered on and connected to the correct network.
- Tested with YouTube, which can discover the TV and cast without issue.
- Verified my App ID and network configurations.
- Whitelisted the receiver device on the Cast Developer Console 5 days ago.
- Rebooted the TV after whitelisting.
- Verified sender app permissions and setup.
Questions:
- Is it mandatory for the app to be published on the Google Cast Developer Console for device discovery to work?
- Do I need to configure anything specific in the Sender App to ensure it works with a Styled Media Receiver?
- Could this issue be related to the
Intent to Join URIor App ID configuration? - What additional troubleshooting steps can I take to debug this issue?
Any insights or guidance would be greatly appreciated!