As far as the 1st (and major) issue of my question is concerned, I think I've figured it out.
try {
String[] fileNames;
fileNames = MyAudioGuideApplication.this.getAssets().list("");
for(String name:fileNames){
if (Arrays.asList(getResources().getAssets().list(name)).contains("data.xml"))
process.the.file.here
}
} catch (IOException e) {}
I'm still not sure how exactly getAssets works but at least the following seems to turn out:
- folders are ignored if they contain no files
- output is sorted alphabetically regardless the structure
- when called from the root folder - i.e. ...list("") - it lists even subdirectories
Maybe it can help someone struggling as I have.