title: Android Cast SDK V3 and MediaRouteProviderService
body: <p>I was using cast SDK v2  to cast media on routes provided <code>MediaRouteProviderService</code> which was working great.</p>
  
  <p>Now I am migrating to <a href="https://developers.google.com/cast/v2/android_migrate_sender" rel="nofollow noreferrer">SDK v3</a> and its states</p>
  
  <blockquote>
    <p>In v3, the discovery process is started and stopped automatically by
    the framework when the app comes to the foreground and goes to the
    background, respectively. MediaRouteSelector and MediaRouter.Callback
    should not be used</p>
  </blockquote>
  
  <p>So how to provide custom routes using <code>MediaRouteProviderService</code> with cast SDK v3</p>