I am trying to read a text file that is already saved in my directory and print it on the screen as a TextView. This is the code that I have so far. However, when I run the
You should store those files in assets
or raw
directory.
And after that you can get inputstream from those files by using ,
If using assets
AssetManager am = context.getAssets();
InputStream is = am.open("test.txt");
OR if you use raw directory then ,
InputStream is = getResources().openRawResource(R.raw.test);