title: Seting the duration of Media Player media in Android
body: <p>I want to set the time duration for <code>MediaPlayer</code>. Here is my code:</p>
  
  <pre><code>MediaPlayer play = MediaPlayer.create(getApplicationContext(),R.raw.beepsound);
  play.start();
  </code></pre>