Google Cast - 示例CastRemoteDisplay-android无法正常工作?

问题描述:

我拼命试着让下面的示例代码运行: https://github.com/googlecast/CastRemoteDisplay-androidGoogle Cast - 示例CastRemoteDisplay-android无法正常工作?

有2台Chromecast设备在我的网络上,并运行(与其他示例应用程序的工作)

根据安装说明:

  • 我创建了一个新的应用程序ID为远程显示接收器,具有名称“CastRemoteDisplay”
  • 我复制所得的应用ID到字符串资源“APP_ID”

当运行AP折,,该按钮不可见。这个问题显然是位于该语句:

mMediaRouteSelector =新 MediaRouteSelector.Builder() .addControlCategory(CastMediaControlIntent.categoryForCast(的getString(R.string.app_id))) .build();

我错过了什么?

感谢您的反馈 塞尔

+0

忘记提及:这两个设备都在Google Cast SDK开发者控制台中注册为Cast Receiver Devices。 –

从你的解释推导,我认为你误以为“app_name”为“app_id”。你看,他们完全不同的价值观。在格式从第strings.xml of android cast sample

<string name="app_name">Cast Videos Sample</string> 
<string name="app_id">4F8B3483</string> 

单独找你说你放在“CastRemoteDisplay”为app_id,但看的格式,“app_id”是一组随机的字母数字字符。所以你的“CastRemoteDisplay”是app_name。现在值为app_id,在您的Cast开发控制台中查找类似于此格式“4F8B3483”的值。

希望有所帮助。