从一台设备断开ChromeCast的连接后,它与两台Android设备的连接都断开了 [英] On disconnecting ChromeCast from one device it is getting disconnected from both android devices

查看:111
本文介绍了从一台设备断开ChromeCast的连接后,它与两台Android设备的连接都断开了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两台设备已连接到Chromecast接收器,并且与另一台设备断开连接也会断开另一台设备的连接。最近将SDK版本升级到9.8.0,并发布仅此问题可见。对此有任何见解吗?

Two devices are connected to a Chromecast receiver and disconnecting from one also disconnects the other device. Recently upgraded the SDK version to 9.8.0 and post that only this issue got visible. Any insights for this?

推荐答案

您需要查看您的接收器应用,并查看在那里使用的可能导致此问题的逻辑行为。在接收方,当发送方断开连接时,将调用 onSenderDisconnected(),此时,您需要查看是否还有其他已连接的发送方,并且仅当存在没有,您应该关闭接收器。您可以查看参考接收器示例以了解如何完成此操作,或阅读有关的信息此处。如果使用默认或样式接收器,则需要确保没有从发送方调用 stopApplication()

You need to look at your receiver app and see what logic you are using there that could cause this behavior. On the receiver side, onSenderDisconnected() is called when a sender disconnects and at that point, you need to see if there is any other connected sender left there and only if there is none, you should close the receiver. You can take a look at the reference receiver sample to see how that can be done, or read about it here. If you are using the Default or a Styled receiver, then you need to make sure that you are not calling stopApplication() from your sender side.

这篇关于从一台设备断开ChromeCast的连接后,它与两台Android设备的连接都断开了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆