You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "wencywww (via GitHub)" <gi...@apache.org> on 2023/01/25 08:38:10 UTC
[GitHub] [cordova-plugin-file] wencywww opened a new issue, #557: directoryReader.readEntries returns only media files and directories under Android > 7
wencywww opened a new issue, #557:
URL: https://github.com/apache/cordova-plugin-file/issues/557
## Problem
directoryReader.readEntries() does not return all existing entries
### What is expected to happen?
To receive an array containing entries for all existing directories and files regarding of their type
### What does actually happen?
Under Android 11, when using directoryReader.readEntries() to read a particular directory, the returned array seems to contain only media-type file entries (jpg/png, amr, mp4, etc.). and directory entries
## Information
I use Samsung 2 phones with identical contents of the given directory, one with Android 7, the other with Android 11. The first one works as expected, but the second one does not. The same is with a third device using Android 12
### Command or Code
```
function printDirectoryContents() {
window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory + "mydir", function (dirEntry) {
var directoryReader = dirEntry.createReader();
directoryReader.readEntries(function (entries) {
console.log(entries);
});
});
}
```
### Version information
Cordova: 11.0.0
Cordova-plugin-file: 7.0.0
Android v. 7, 11, and 12
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
--
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.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] directoryReader.readEntries returns only media files and directories under Android > 7 [cordova-plugin-file]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #557: directoryReader.readEntries returns only media files and directories under Android > 7
URL: https://github.com/apache/cordova-plugin-file/issues/557
--
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.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] directoryReader.readEntries returns only media files and directories under Android > 7 [cordova-plugin-file]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #557:
URL: https://github.com/apache/cordova-plugin-file/issues/557#issuecomment-3955032871
Under scoped storage, only media files (images, audio and video) are readable. This is an intentional limitation by Android and the quirk is noted at https://github.com/apache/cordova-plugin-file?tab=readme-ov-file#androids-external-storage-quirks
If you use other media types, you must use a plugin that interfaces with MediaStore APIs instead.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org