android - Detecting if I am the only Chromecast sender app connected to a Chromecast device -
According to
Sender artist continues to a TV Unless the last connector is disconnected or until the sender becomes something new, when the last or only sender is connected to a receiver, the disc running on the receiver ceases when the disconnect is closed, and Then the sender keeps running or stopping on the device. I am using Castcompanionlibrary from Google.
If I
mgr.setStopOnDisconnect (false); When the last sender disconnects, this receiver will not stop the app. If I set it to true , this receiver stops the app even if it is not the only connected sender app.
What do I need to do in the sender app so that it closes if the last sender disconnects only the receiver app? That is, when the user wants to disconnect, I have to check whether I am currently the last / only sender app and if so, first stop the receiver app and then disconnect it.
This is not in the sender; The sender generally does not know how many other connected senders are there, nor should they know. The receiver, however, has that information and that has stopped the app if necessary is the correct behavior / code document; Look for subsection "session management" note that the default / style receiver does already.
Comments
Post a Comment