I found you need to recurse through the assets folder if you have created directories within it.
private void listAssets(String startPath, int level) {
try {
for(String s : getAssets().list(startPath)){
Log.d(TAG, "Level " + level + " asset found: " + s);
if (Pattern.matches(nameExp, s)) {
// TODO: Handle the asset matching the regex here!
}
// Recursively call ourself, one level deeper
String newPath = s;
if(startPath.length() > 0) {
newPath = startPath + "/" + s;
}
listAssets(newPath, level + 1);
}
} catch (IOException e) {
Log.d(TAG, "No assets for: \"" + startPath + "\"");
}
}
Then I kicked this off by searching for top level assets by passing an empty string
listAssets("", 1);