title: How to read a file directly from external download directory on Android 10 (Q)
body: <p>I am trying to read a file from the download folder on Android Q by doing this:</p>
  
  <pre class="lang-java prettyprint-override"><code>        File downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
          File f = new File(downloadDir, "some-existing-file");
          if(!f.exists()) {
              throw new IllegalStateException();
          }
  
          Uri furi = Uri.fromFile(f);
          try {
              ParcelFileDescriptor des = getContentResolver().openFileDescriptor(
                      furi, "r", null);
          } catch (FileNotFoundException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>I also set <code>android:requestLegacyExternalStorage="true"</code> in the manifest, and requested <code>WRITE_EXTERNAL_STORAGE</code> and <code>READ_EXTERNAL_STORAGE</code> runtime permissions.</p>
  
  <p>The file exists but when trying to open the file descriptor, an exception arises: 
  <code>java.io.FileNotFoundException: open failed: EACCES (Permission denied)</code>.</p>
  
  <p>I read the <a href="https://developer.android.com/training/data-storage" rel="noreferrer">changes made</a> in Android Q storage, but could not figure out how can I just read the file without having user interaction.</p>
  
  <p>Thanks!</p>