title: How to add an delay before starting playback in Android?
body: <p>This maybe an odd question, but I want to add an artificial delay (say, 100ms) before starting an audio playback using MediaPlayer class in Android. This should happen after the AudioManager.AUDIOFOCUS_REQUEST_GRANTED and before player.start(). Here's my code:</p>
  
  <pre><code> int result = am.requestAudioFocus(afChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
   if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED){
                 //add delay
                 player.start();}
  </code></pre>
  
  <p>Tried Googled this but can't seem to find anything useful and I'm too new to even know what to search for.. would appreciate any pointers!</p>