title: Media Player Forward & Backwarding issues
body: <p>In my code The forward &amp; back ward (these are button click events) are working after the file played(stopped).My aim is to fwd/bckwd while plying the file.</p>
  
  <p>Here is my code                                                   </p>
  
  <pre><code>       forward.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View arg0) {
              // get current song position                
              int currentPosition = mp.getCurrentPosition();
              // check if seekForward time is lesser than song duration
              if(currentPosition + seekForwardTime &lt;= mp.getDuration()){
                  // forward song
                  mp.seekTo(currentPosition + seekForwardTime);
              }else{
                  // forward to end position
                  mp.seekTo(mp.getDuration());
              }
  
          }
      });
          backward.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View arg0) {
              // get current song position                
              int currentPosition = mp.getCurrentPosition();
              // check if seekBackward time is greater than 0 sec
              if(currentPosition - seekBackwardTime &gt;= 0){
                  // forward song
                  mp.seekTo(currentPosition - seekBackwardTime);
              }else{
                  // backward to starting position
                  mp.seekTo(0);
              }
              // update timer progress again
              updateProgressBar();
          }
      });
  
  
  
  
  private void playAudio(String path) 
  {
      Log.i("play","riyasssss");
      playing_started=true;
      // Play song
              try {
                  mp.reset();
                  mp.setDataSource(path);
                  mp.prepare();
                  mp.start();
  
                  // Changing Button Image to pause image
                  play.setText("Puase");
  
                  // set Progress bar values
                  sb.setProgress(0);
                  sb.setMax(100);
  
                  // Updating progress bar
                  updateProgressBar();            
              } catch (IllegalArgumentException e) {
                  e.printStackTrace();
              } catch (IllegalStateException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              }
  }
  
  
  
  
  /**
   * Update timer on seekbar
   * */
  public void updateProgressBar() {
      mHandler.postDelayed(mUpdateTimeTask, 100);        
  }   
  
  /**
   * Background Runnable thread
   * */
  private Runnable mUpdateTimeTask = new Runnable() {
         public void run() {
             long totalDuration = mp.getDuration();
             long currentDuration = mp.getCurrentPosition();
  
             // Displaying Total Duration time
             total_time.setText(""+utils.milliSecondsToTimer(totalDuration));
            // Displaying time completed playing
             current_time.setText(""+utils.milliSecondsToTimer(currentDuration));
  
             // Updating progress bar
             int progress = (int)(utils.getProgressPercentage(currentDuration, totalDuration));
             //Log.d("Progress", ""+progress);
             sb.setProgress(progress);
  
  
  
                if(current_time.getText().toString().equalsIgnoreCase(total_time.getText().toString()))
                 {
                     //playingStarted=0;
                     play.setText("Play");
  
                 }
                 if(totalDuration&lt;currentDuration)
                 {
                     mHandler.postDelayed(this, 10000000);
                      System.out.println("time task waited !!!!!!!!!!!");
  
                 }
  
  
  
             // Running this thread after 100 milliseconds
             mHandler.postDelayed(this, 100);
         }
      };
  
      `
  </code></pre>
  
  <p>Please Give me a soln..Thanx in advance</p>