title: How to save file to public (external) storage on Android Q (API 29)?
body: <p>I have been using external storage in order to save a different type of files. That files needs to be visible to user. And now from Android Q, the method <code>getExternalStoragePublicDirectory()</code> has been deprecated <a href="https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)" rel="noreferrer">getExternalStoragePublicDirectory(docs)</a>.</p>
  <p>I used following code:</p>
  <pre><code>File externalFilesDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), &quot;DirectoryName&quot;);
  </code></pre>
  <p>Is there another way to save files which will be visible to user?</p>