In a typical Android project you have the res/drawable
directories where you can put images but i have some special custom binary files.
where do I usually put them and can i access them via the R-class
then?
In a typical Android project you have the res/drawable
directories where you can put images but i have some special custom binary files.
where do I usually put them and can i access them via the R-class
then?
Either in res/raw or res/assets. Read more in the Android docs.
About files in res/raw:
Arbitrary files to save in their raw form. Files in here are not compressed by the system. To open these resources with a raw InputStream, call Resources.openRawResource() with the resource ID, which is R.raw.filename.
However, if you need access to original file names and file hierarchy, you might consider saving some resources in the assets/ directory (instead of res/raw/). Files in assets/ are not given a resource ID, so you can read them only using AssetManager.AssetManager.