title: mediaPlayer CompletionListener playing next song before Completion of song
body: <p>I have written a mediaPlayer Application and in that <code>mediaplayer.setOnCompletionListener</code> is called before the completion of song and it goes on for every song...It's keep on going to next song until it reaches the last song in playList... Please Help</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code> tracksListViewForSpeakers.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int position, long l) {
                  Track track = playlistContents.get(position);
                  String filepath = track.getFilePath();
                  if (mediaPlayer.isPlaying()) {
                      mediaPlayer.stop();
                  }
                  mediaPlayer.reset();
                  try {
                      mediaPlayer.setDataSource(filepath);
                      mediaPlayer.start();
  
  //                    mediaPlayer.setVolume(0, 0);
                  } catch (IOException e) {
                      e.printStackTrace();
                      for(int i=0;i&lt;4;i++)
                          System.out.println("MediaPlayer Exception");
                  }
  
              }
          });
  </code></pre>
  
  <p><strong>Completion Listener</strong></p>
  
  <pre><code>mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
              @Override
              public void onCompletion(MediaPlayer mp) {
                  onNextClicked(mp);
              }
          });
  </code></pre>
  
  <p><strong>OnNextClickedMethod</strong></p>
  
  <pre><code>public void onNextClicked(MediaPlayer mp){
  int val = myModel.getCurrentPlayingIndex();
  val=val+1;
  Track track = currentPlayList.get(val);
          String filepath = track.getFilePath();
  if (mp.isPlaying()) {
              mp.stop();
          }
          mp.reset();
          try {
              mp.setDataSource(filepath);
              mp.start();
  //            mediaPlayer.setVolume(0, 0);
          } catch (IOException e) {
              e.printStackTrace();
          }
  
    }
  
  }
  </code></pre>