On disconnecting ChromeCast from one device it is getting disconnected from both android devices

1k Views Asked by At

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?

1

There are 1 best solutions below

9
On

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.