How to determine if the user willingly disconnected from a Cast device?

101 Views Asked by At

When an Android app gets disconnected from a Cast device, Cast Companion Linrary's callback onApplicationDisconnected() is called to inform the app of the disconnection.

But how can we distinguish between the case where user willingly disconnects using the media route button in the ActionBar and the one where connection loss is triggered automatically due to WiFi errors / timeouts, etc.?

Does MediaRouter dialog provide any callback informing of the disconnection action taken by the user or would we have to make our own dialog to catch that event?

0

There are 0 best solutions below