I have a list of mp3 files under my asset folder, I want to list the files and there paths that exist under this directory.
I have tried getAssets() but all what I get is filenames.
is there any other way?
thanks in advance
I have a list of mp3 files under my asset folder, I want to list the files and there paths that exist under this directory.
I have tried getAssets() but all what I get is filenames.
is there any other way?
thanks in advance
This question was already answered here in the link below in stackoverflow:
android list files contained in assets subfolder
Then with their names you can access them depend on what they are e.g. If they are image you access them like below:
try {
InputStream im = getAssets().open("image.jpg");
Drawable d = Drawable.createFromStream(im, null);
imageView.setImageDrawable(d);
}
catch(IOException ex) {
return;
}