title: How to play audio file dynamically without using OnCompletionListener()
body: <p>How to play audio file one after the other without using OncompletionListener();</p>
  
  <p>here is my code:</p>
  
  <pre><code>mp.setOnCompletionListener(new OnCompletionListener() {
  
              @Override
              public void onCompletion(MediaPlayer mp) {
                  // TODO Auto-generated method stub
                  i = i + 1;
                  System.out.println("" + audio.length);
                  if(i &lt; audio.length){
                      img.setImageResource(image[i]);
                      try {
                          descriptor = getAssets().openFd(audio[i]);
                          mp.reset();
                          mp.setDataSource( descriptor.getFileDescriptor(), descriptor.getStartOffset(),descriptor.getLength());
                          descriptor.close();
                          mp.prepare();
                          mp.start();
                          xml();
                      } catch (IOException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
  
                  }
  </code></pre>
  
  <p>here the method xml() contains images and audio files that i am picking from assets folder</p>
  
  <p>and also i need to play those files dynamically</p>
  
  <p>please help</p>