Davparis edited a comment on issue #426: URL: https://github.com/apache/cordova-plugin-file/issues/426#issuecomment-821302905
Here is my case : I have an app in production that actually : - target API29, with android:requestLegacyExternalStorage="true" - and use : 1) cordova.file.externalRootDirectory 2) file path to external card, if the external card exits, via cordova.plugins.diagnostic.getExternalSdCardDetails According to my tests, with a device using Android 11 (API 30) and android:requestLegacyExternalStorage="false" in AndroidManifest.xml <s>- I can read an existing file - but can't create a new one</s> EDIT: When i change android:requestLegacyExternalStorage from "false" to "true" : - with a simple update of the app, Read and Write are OK - when the app is uninstalled, and re-installed, no Read, no Write To support the changes requested by Google, I'm planning to : - check if access to external is actually granted via cordova.plugins.diagnostic.requestExternalStorageAuthorization and then : - copy user existing files (as far as i can read them) to cordova.file.dataDirectory - put a variable in localstorage, so that the app use cordova.file.dataDirectory for the next starts. If it is a fresh install, I would use only cordova.file.dataDirectory for storing the new files. But i'm stuck for the access to external card. Is there a way to get a path to a folder in external card, even if that path is acceded only by my application ? What is strange is that the path returned by getExternalSdCardDetails seems to use a sandboxed folder : file:///storage/0123-4567/Android/data/com.mycompany.myapp/files/ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
