Reputation: 145
I have my cast receiver app stopped in the mainactivity onStop or onPause. When resume the Mainactivity, MediaRouterActionProvider Menu item Dialog is still connected. Is there any method to disconnect them and make the MediaRouterActionProvider back to MediaRoute Chooser dialog?
Upvotes: 0
Views: 149
Reputation: 19094
When you say your receiver app is stopped, do you mean you have called stopApplication() or do you mean you have called stop() on the RemoteMediaPlayer? stopApplication practically disconnects your app. If that is the case, you need to add logic to capture that and clean up things a bit. A manual way to make the Cast button look disconnected is to call mMediaRouter.selectRoute(mMediaRouter.getDefaultRoute())
Upvotes: 2