0

I'm struggling for hours now to read and write to SD card on Android using cordova, since cordova.file.externalRootFolder just gives back file:///storage/emulated/0 (Android 6.0+), which is the same as the internal disk. But I got that working now, so I got file:///storage/7EC0-0CEC/, which is the root folder of the SD-card I inserted into my smartphone. I still can't create folders on that root, but I can use the application folder file:///storage/7EC0-0CEC/Android/data/{app-name}/files/.. to store my files. Now with the file-opener2-plugin I can't open the File. The Error I get is:

Failed to find configured root that contains /storage/7EC0-0CEC/Android/data/{app-name}/files/test.txt

Any suggestions? Did I miss to configure something?

Steffen B
  • 1
  • 1
  • Yes. Your app can write to `file:///storage/7EC0-0CEC/Android/data/{app-name}/files/..`. Its the app specific directory on a micro SD card. The rest of the card is not writable for your app. Thats how Google wanted it. – greenapps Feb 21 '18 at 17:03
  • `Failed to find configured root that contains /storage/7EC0-0CEC/Android/data/{app-name}/files/test.txt` That is not a message i would expect from a file picker. It looks more a message form a file provider. – greenapps Feb 21 '18 at 17:05
  • file-opener2 is not a "file picker". Like the name says it's a plugin to open files external (Android Dialog, choose the app you want to open the given file with) – Steffen B Feb 22 '18 at 07:06

0 Answers0