title: How to save PDF into Documents in external storage in Android 30?
body: <p>How to save pdf files in default Documents folder in external storage of the android?</p>
  <p>I have tried with:</p>
  <pre><code>       Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
         intent.addCategory(Intent.CATEGORY_OPENABLE);
         intent.setType(&quot;application/pdf&quot;);
         intent.putExtra(Intent.EXTRA_TITLE, name);
         startActivityForResult(intent,PDF_REQUEST_CODE);
  </code></pre>
  <p>But this opens another Document provider activity with save option. I want that the pdf file saves directly into Document folder from a single click on my application.</p>