title: Can't access external storage in API-29
body: <p>The following code works well in the lower API-29. But when using API-29, it gives access denied to external storage error.</p>
  <pre><code>public void persistFile(byte[] bytes, String path, String fileName) throws IOException {
      OutputStream fOut = null;
      File picDirectory = new File(path);
      File file = new File(path, fileName); 
      fOut = new FileOutputStream(file);
      fOut.write(bytes); 
      fOut.flush();  
      fOut.close();  
  }
  </code></pre>
  <p>AndroidManifest.xml</p>
  <pre><code>&lt;manifest&gt;
     &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;
  &lt;/manifest&gt;
  </code></pre>