Where to keep text files in Android project in eclipse
I am trying to find out, where should I keep text files in my Android project and how to refer their location in the code.
I kept my files under the main project directory and referred in the file as /sample.txt. but this did not work开发者_StackOverflow社区.
I would store it in the assets folder and reference it by using something like
Activity.getAssets().open(sample.txt)
You should keep them in /assets
dir. Access them later with AssetManager.
精彩评论