How to Create and Access Assets Folder in Android
Managing the assets folder in an android project might be the important thing in the some of the projects, If you don't know how to create and access assets folder in android then read on the following steps.
Creating an Assets Folder
Creating an assets folder is really a simple thing. There are two easy ways to do that.
1. Simply create an empty folder under
/YourProject/app/src/main/ and name it as assets.
2. Go to
File->New->Folder and choose
That's it here you have created an assets folder in your android project.
Accessing an Asset Folder
To access Assets Folder
AssetManager assetManager = getAssets(); String files = assetManager.list("");
To open a certian file:
InputStream input = assetManager.open("filename");