0

I have a text file residing in a folder which is in the same directory as the 'src' folder. How can I read a text file stored in there?

I have already tried storing the file in assets, but since assets are not unzipped, it is inappropriate. Also, putting it in raw folder doesn't work. I need some way of getting an Inputstream object from the filename. Help will be appreciated.

aceBox
  • 711
  • 2
  • 13
  • 30

1 Answers1

0

Code:

AssetManager assetManager = getApplicationContext().getAssets();
InputStream ims = assetManager.open("Filename.txt");
Nadeem Iqbal
  • 2,357
  • 1
  • 28
  • 43