I'm trying to build a mini File Explorer, I've got it working; but can only list the internal storage (local) - I can't seem to access the external SD Card.
Here's an example of the code I'm using:
function getFiles(){
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onRequestFileSystem, function (evt){alert("ERRR... 1");});
}
function onRequestFileSystem(fileSystem) {
var directoryReader = fileSystem.root.createReader();
directoryReader.readEntries(onReadEntries, function (evt){alert("ERRR... 2");});
}
function onReadEntries(entries) {
for (var i = 0; i < entries.length; i++) {
console.log(entries[i].name+ " " + i);
}
}
1) How would I list the contents of my SD Card.
2) The S3 I'm using lists the SD card as extSdCard (img attached) - but I know other devices don't use this naming convention; the Xperia's SD card is /storage/sdcard1 - is there a consistent way of referencing external storage?