I use this codes to get all Folders:
File MyDir[] = getExternalCacheDirs();
And then I use these code to show the path:
Toast.makeText(getApplicationContext(), MyDir[0].getPath(), Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(), MyDir[1].getPath(), Toast.LENGTH_LONG).show();
However, I wonder how to get the length of the file list, so I can use the for-loop to show all path
Like:
for (j = 0; j <= <size_of_the_list>; j += 1) {
Toast.makeText(getApplicationContext(),MyDir[j].getPath(),Toast.LENGTH_LONG).show();
}