title: Connecting SeekBar to MediaPlayer isn't working
body: <p>I've been following a tutorial to implement a <code>SeekBar</code> to my app but it isn't working. Here's how I'm trying to do it.</p>
  
  <pre><code>public void run(){
      int currentPosition = 0;
      int total = player.getDuration();
      sBar.setMax(total);
  
      while (player.isPlaying()) {
          try {
              Thread.sleep(1000);
              currentPosition = player.getCurrentPosition();
          } catch (InterruptedException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          sBar.setProgress(currentPosition);
      }
  }
  </code></pre>
  
  <p><code>sBar</code> is the <code>SeekBar</code> which I declared as a global variable.</p>
  
  <p>Now the problem is that there was nowhere mentioned in the tutorial where to then call this run method? I tried calling it right after the <code>MediaPlayer</code> is started but it isn't working. </p>