I am currently working on a project that requires me to copy files from a phone to a flash drive connected to the phone. Before the Android 11 update, I could easily access the attached USB flash drive using the @ionic-native/file plugin and list all the directories on the flash drive. However with the new update to Android, whenever I try and list the file:///storage directory the listDir function doesn’t cause a rejection, nor does it throw it an error, it just returns an empty array. Below is a picture of the code that I am using in order to iterate through the storage directory for Android devices.
I am using:
Ionic CLI 6.12.0
Ionic Framework @ionic/angular 5.5.2
Capacitor CLI 2.4.3