I need to save files to the root volume directories.
To do this I’m using
WRITE_EXTERNAL_STORAGE
permission for old devices and
MANAGE_EXTERNAL_STORAGE
for newer ones.
Currently I am able to write files to any volumes on any Android version except for Android 10 (29 SDK). As for this Android version, I am able to write a file to a primary external volume (internal memory) but when I try to save a file to secondary external volume I receive java.io.IOException: Permission denied exception.
Manifest permissions:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<application
android:requestLegacyExternalStorage="true"
option is set.
Any ideas on how this is to be done without SAF?
dunkpi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.