With my current implementation I use the callback from onRouteUnselected in the MediaRouter.Callback to decide when to stop the receiver application.

    @Override
    public void onRouteUnselected(MediaRouter router, RouteInfo info) {

        stopApplication();
    }

The problems is that I want to have a different behavior if my sender application gets disconnected (example could be losing WIFI connection) compared to if a user actively open the dialog and press disconnect. Is there any way to see if this event was triggered from a user?

有帮助吗?

解决方案

In near future we will release an update in which a reason as to why disconnect has happened will be added, which, in turn, enables you to do what you want.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top