title: Get random sound file from raw folder - Android - MediaPlayer
body: <p>I'd like to:</p>
  
  <ol>
  <li>Generate a random number (easy enough)</li>
  <li>take that random number and add it to some sort of dynamic path</li>
  <li>use the dynamic path in the mediaplayer creation.</li>
  </ol>
  
  <p>E.g.</p>
  
  <p>Resource folder(raw) contains 
  1.mp3
  2.mp3
  3.mp3</p>
  
  <p>Random number generates a number between 0 and 4 </p>
  
  <p>e.g: 2</p>
  
  <p>Inserts random number to path</p>
  
  <p>E.g. a String?</p>
  
  <pre><code>String PATH = "R.raw." + RANDOM-NUMBER
  
  MediaPlayer mp = MediaPlayer.create(context, PATH);
  </code></pre>
  
  <p>However, of course MediaPlayer uses a URI variable not a string, i did try </p>
  
  <pre><code>myUri = Uri.parse("R.raw.2"); 
  </code></pre>
  
  <p>but get a nullPointerException</p>
  
  <p>I imagine this is very simple/straight forward to answer and my knowledge simply evades me</p>
  
  <p>Thanks very much </p>