I am creating an app for android to support google cast for video with interaction using CastCompanionLibrary library. On the video VideoCastManager use and for the part of the exchange of messages (data) DataManagerCast use. I want to implement a control who can connect to a particular session. My idea is that the first sender to connect on chromecast be the "owner of the session" and other senders need to ask permission to him to connect. I created a namespace for communication between the receiver and the sender session owner for the connection process occurs. If the sender is not authorized then it should disconnect. I took a look at receiver reference searching for a method to the receiver disconnect a particular sende, but it still fails. Does anyone know if it is possible to implement this my idea?
First, why are you using DataCastManager? VideoCastManager can add a data channel and that is all you'd need to communicate so only use the VideoCastManager.
As far as memory serves, receiver cannot disconnect individual senders, so an alternative to your approach would be: