title: BitmapFactory.decodeFile returns fileNotFoundException
body: <p>I have a problem concerning the BitMapFactory.decodeFile. </p>
  
  <p>In my app, I want to user to be able to select an image from his/her device or take a photograph. This must then be displayed in an ImageView (medication_photo). I try to downscale the image as well because in my previous code I got OutOfMemory errors. </p>
  
  <p>The problem is that after selecting an image, my app throws this exception: </p>
  
  <pre><code>FileNotFoundException: Unable to decode stream: 
  java.io.FileNotFoundException: /content:/media/external/images/media/1499:
  open failed: ENOENT (No such file or directory)
  </code></pre>
  
  <p>Code snippet:</p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
      if (requestCode == CAPTURE_PHOTO) {
          if (resultCode == RESULT_OK) {
              String result = data.getDataString();
              setPhoto(result);
          }
      }
  
      // browse photo
      if (requestCode == BROWSE_PHOTO) {
          if (resultCode == RESULT_OK) {
              String result = data.getDataString();
              setPhoto(result);
          }
          if (resultCode == RESULT_CANCELED) {
  
          }
      }
  }
  
  
  
  private void setPhoto(String path) {
      // re-scale image first
      try {
          File file = new File(path);
          Log.e("MedicationAdd.setPhoto-&gt;file",file.getAbsolutePath()); // this did not work 
  
          BitmapFactory.Options options = new BitmapFactory.Options();
          options.inJustDecodeBounds = true; 
          BitmapFactory.decodeFile(path,options); // FileNotFound
          options.inSampleSize = scaleDownBitmap(options, options.outWidth, options.outHeight);
          Log.e("MedicationAdd.setPhoto-&gt;path",path);
          options.inJustDecodeBounds = false;
          this.bm = BitmapFactory.decodeFile(path,options); // FileNotFound
  
          this.medication_photo.setImageBitmap(this.bm);
      } catch (Exception e) {
          Log.e("MedicationAdd.setPhoto", e.toString());
      }
  }
  </code></pre>