How to grab random videos to play under certain conditions
<p>My goal is to have multiple mp4's stores in different folders on a server.  I want to grab one of the videos from the folder when a certain condition is met.  How would I grab a random video file from a particular folder?  Here is the code I have written:</p>

<pre><code>public static Uri getVideoPath(String cond){
  Uri tempPath;

  if((cond.equals("01"))||(cond.equals("02"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/sunny/");
  }else if((cond.equals("03"))||(cond.equals("04"))|| (cond.equals("05"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/some_sun/");
  }else if((cond.equals("06"))||(cond.equals("07"))||(cond.equals("08"))||
    (cond.equals("36"))||(cond.equals("37"))||(cond.equals("38"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/cloudy/");
  }else if((cond.equals("09"))||(cond.equals("10"))||(cond.equals("27"))||(cond.equals("28"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/light_gray/");
  }else if(cond.equals("11")){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/fog/");
  }else if((cond.equals("12"))||(cond.equals("13"))|| (cond.equals("14"))||
    (cond.equals("39"))||(cond.equals("40"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/showers/");
  }else if((cond.equals("15"))||(cond.equals("16"))|| (cond.equals("17"))||
    (cond.equals("40"))||(cond.equals("41"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/thunderstorms/");
  }else if(cond.equals("18")){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/rain/");
  }else if((cond.equals("19"))||(cond.equals("20"))|| (cond.equals("21"))||(cond.equals("43"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/flurries/");
  }else if((cond.equals("22"))||(cond.equals("23"))||(cond.equals("44"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/snow/");
  }else if((cond.equals("24"))||(cond.equals("25"))|| (cond.equals("26"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/ice/");
  }else if(cond.equals("29")){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/rain_and_snow/");
  }else if(cond.equals("30")){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/hot/");
  }else if(cond.equals("31")){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/cold/");
  }else if(cond.equals("32")){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/windy/");
  }else if((cond.equals("33"))||(cond.equals("34"))||(cond.equals("35"))){
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/clear/");
  }else{
   tempPath = Uri.parse("http://www.personal.psu.edu/tmv105/video/clear/");
  }   
  return tempPath;
 }
</code></pre>
