title: Android MediaPlayer SeekTo function workaround
body: <p>I am creating a very simple media player app. I would like to resume  the song from the SeekTo position that I have captured using getCurrentPosition. However seekTo does not start from the position I have captured but from the beginning. </p>
  
  <p>Code to capture current position, pause and change button text to Click to resume</p>
  
  <pre><code>int media_length = mediaplayer.getCurrentPosition();
      Toast.makeText(this,"media length is"+media_length, Toast.LENGTH_LONG).show();
      mbutton.setText("Click to Resume");
      mediaplayer.pause();
  </code></pre>
  
  <p>Code to seekTo captured position, start and change button text to Click to Pause</p>
  
  <pre><code>    mediaplayer.seekTo(media_length);
      mediaplayer.start();
      mbutton.setText("Click to Pause");
  </code></pre>
  
  <p>A couple of posts are there already related to it but they seem to claim a bug in Android. 
  Ref: <a href="https://stackoverflow.com/questions/17678027/mediaplayer-seekto-doesnt-work">MediaPlayer seekTo doesn&#39;t work</a> and 
  is there any workaround for this? appreciate any help.</p>