How to include data files with the app’s APK?

If you have a larger number of files and a directory structure you should use /assets. These are not given any R-constants and can be scanned by your application

To open an asset-file:

InputStream is = getAssets().open("path/file.ext");

To list a directory:

String[] files = getAssets().list("");

Leave a Comment