Hi, for an Android project I download some files to the SD card of my device. This thing automatically creates a new folder with the name com.mydomain.myapp.
At a second time I want to delete the files in this folder.
I believed this could work but it doesn't:
function deleteFilesInExternalDirectory(){ if(Ti.Filesystem.isExternalStoragePresent()){ var externalStorage = Ti.Filesystem.externalStorageDirectory; var externalStorageFiles = externalStorage.getDirectoryListing(); for(var i=0;i<externalStorageFiles.length;i++){ // here there could be the code to delete the files but // the alert NEVER executes alert(externalStorageFiles[i]); } } }What am I doing wrong? The app freezes after the function call. In the folder there are only ten files or so.