Android 10: What are my options to save files on external storage into a directory called "/sdcard/my-app/" : <p>Up until Android Pie I always stored files which the app needed to get stored on <code>/sdcard/my-app/</code>, which I got via</p>

<p><code>File fBaseDir = new File(Environment.getExternalStorageDirectory(), "my-app");</code></p>

<p>One of my App stores hundreds (up to multiple thousands) of favicons in <code>/sdcard/my-app/favicons</code>, and when the user creates a backup of the app, it gets stored in <code>/sdcard/my-app/backups</code>. Webpage-Screenshots taken by Google Chrome when shared with my app are stored in <code>/sdcard/my-app/screenshots</code>, and so on.</p>

<p>When I uninstall the app, I can reinstall it later and still have all the favicons, screenshots and the backups available for restoring the state and not having to re-download all the favicons (and possibly having lost all the other data).</p>

<p>I can also easily create a backup of the <code>/sdcard/my-app/</code> directory by copying it to my PC, and restore it on another phone, for example when I migrate to a new device.</p>

<p>I can also use a file explorer to see which files are in that directory, and select and email them or copy them to Google Drive, or delete some of them specifically (like old backup files).</p>

<p>With Android 10 this approach has collapsed. I cannot add the favicons to the Images Media-Folder, because they are no real images, they would clutter the view unnecessarily and possibly ban my developer account from the Play Store for doing this. I also don't want to store all this data in an App-Private directory, because it will get deleted when the app gets uninstalled, and because other apps like an explorer cannot access them.</p>

<p>What are my options? Manually selecting files or directories is not an option, unless the directory only needs to be selected once and then access is granted forever (to read and write files).</p>

<p>I never read or write outside of <code>/sdcard/my-app/</code>.</p>
