title: Adding delay while Mediaplayer loops
body: <p>Playing <code>.wav</code> file using <code>MediaPlayer</code> class. As I need to loop the Audio I've set <code>.setLooping(true);</code> .  So obviously, the doubt is how do I add a delay each time the audio plays, say I want a delay of <code>5000</code> . </p>
  
  <p>The answers to similar questions here doesn't work in my case. Any help would be appreciated. Here is my code: </p>
  
  <pre><code> Button Sample = (Button)findViewById(R.id.samplex);
      Sample.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
      String filePath = Environment.getExternalStorageDirectory()+"/myAppCache/wakeUp.wav";
  
              try {
                  mp.setDataSource(filePath);
                  mp.prepare();
                  mp.setLooping(true);
  
              }
              catch (IllegalArgumentException e) {
                  e.printStackTrace();
              } catch (SecurityException e) {
                  e.printStackTrace();
              } catch (IllegalStateException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              mp.start();
  
          }
  
  
      });
  </code></pre>