title: Get media current position before disconnecting from cast
body: <p>Is it possible to get current playing media from <code>VideoCastManager</code> before disconnecting from the cast? </p>
  
  <p>I want to save the last progress of current media when the user manually disconnects from cast. I used <code>VideoCastCosumer</code> method <code>onDisconnected()</code> but it throws an exception. Not sure what kind of exception because my log only shows this:</p>
  
  <pre><code>System.err: at com.economist.newton.mobile.ui.activity.BaseCastActivity$1.onDisconnected (MyCastActivity.java:81)
  </code></pre>
  
  <p>This line contains the following line inside the <code>onDisconnected()</code> method:</p>
  
  <pre><code>try {
        if(castManager.getCurrentMediaPosition() &gt; 30000){ //  &lt;-here error occurs
                ...
        }
  } catch (TransientNetworkDisconnectionException | NoConnectionException e) {
        e.printStackTrace();
  }
  </code></pre>
  
  <p>If it any help, <code>castManager</code> variable is declared in <code>onCreate()</code>:</p>
  
  <pre><code>castManager = VideoCastManager.getInstance();
  </code></pre>
  
  <p>Cast companion library: <code>com.google.android.libraries.cast.companionlibrary:ccl:2.8.4</code></p>