I have some media file in my asset folder. I want to get all media files names and files count from my asset folder.
Asked
Active
Viewed 6,518 times
1 Answers
9
A little googling might have helped you!
try this:
AssetManager assetManager = getAssets();
String[] files = assetManager.list("your_folder_name_inside_assets");
List<String> it = new LinkedList<String>(Arrays.asList(files));

TheMohanAhuja
- 1,855
- 2
- 19
- 30

Rat-a-tat-a-tat Ratatouille
- 7,109
- 5
- 31
- 41
-
There is a way to get the folder names that are in the assets folder? – JCarlosR Feb 07 '17 at 22:00
-
1Using an empty string it is possible to get the name of the folders in "assets" (but take a care; because it adds 3 additional folders: images, sounds and webkit). – JCarlosR Feb 07 '17 at 22:18