title: How to load random image from local storage on Android
body: <p>so my question is how can I load image from local storage folder regardless of the name of the image?</p>
  
  <p>here is what I have for now:</p>
  
  <pre><code> File file = new File(Environment.getExternalStorageDirectory().getPath() +
                          "/Download/pictures/for/" + String.valueOf(rand.nextInt(4) + 1) + ".jpg");
  </code></pre>
  
  <p>As you can see the problem is that the solution is bad and hardcoded in a way that it loads only pictures with names from 1 to 5 (ex. 3.jpg).</p>
  
  <p>kind regards!</p>