Open file for reading through resource identifier

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Open file for reading through resource identifier

Postby Hachaso » Thu May 28, 2009 8:48 pm

Hi!

I have saved a simple text.txt file in the resource directory.
res
- drawable
- text.txt

I would like to do something like this to be able to access the file in my resources folder.

String sTest;
FileInputStream input;

sTest = this.getResources().getString(R.drawable.text);
input = this.openFileInput(sTest);

But it does not work.
How can I do this without using the SDCARD????
I want to save it directly in the project and access it from there.

Thanks
Hachaso
Developer
Developer
 
Posts: 43
Joined: Mon Jan 26, 2009 11:44 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests