title: Android - Get file with path
body: <p>I would like to know how to get a file from its name.</p>
  
  <p>I use the camera to take a photo. It saved the photo with this:</p>
  
  <pre><code>String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date());
  File mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_" + timeStamp + ".jpg");
  </code></pre>
  
  <p>And now (after closing and opening again the app), I would like to get the file or Uri from the name of the picture (I saved it in a string (timeStamp)) to a preview.</p>
  
  <p>Sorry for my english.</p>