Selecting MediaRoute on behalf of user works but MediaRoute button is in disconnected state <p>I'm building an app that will launch a chromecast receiver application automatically without the user clicking the mediaroute button and selecting a route. The user has already selected their desired route, and my app attempts to connect to it for a short period of time until it succeeds (hopefully).</p> <p>When it does succeed, the app is launched onto the correct route, however the mediarouter menu item (the one used to select routes traditionally) is not updated, it still remains in the disconnected state. Once the user clicks on it (while the app is already connected to the receiver) it presents him with possible routes, and once he selects the route (the one that is already connected to and displaying the app) the media router menu item updates itself showing that it is connected and allowing the user to disconnect on the next click. </p> <p>I would like it to be updated once successfully connected to the receiver (route). This way the user will be able to disconnect with only a couple clicks (once on the menu item, and once on the 'Stop Casting' button).</p> <p>I am using the CastCompanionLibrary, though I do not think that it matters in this case.</p> <p>I am able to launch the receiver without user action by calling the MediaRouter.Callback directly like so:</p> <p><code>mCastManager.onRouteSelected(mMediaRouter, theRoute);</code></p> <p>Where <code>mMediaRouter</code> is the <code>MediaRouter</code> instance and <code>theRoute</code> is the <code>MediaRouter.RouteInfo</code> instance holding the pre-selected receiver route.</p> <p>Also, I am open to suggestions of better implementing automatic launch of the receiver application from a service/activity.</p>