tags:

views:

98

answers:

2

How to read and write strings in text file in android which is kept in raw folder and also how to clear contents of that file in android?

I have done this way and my "temp.txt" file is in /raw folder. But i am not getting any output in file. Also I am not getting any error for this.

       FileOutputStream fos = openFileOutput("temp", Context.MODE_APPEND);         
        fos.write("Example Text in a file".getBytes());
        fos.flush();
        fos.close();
A: 

Try this one

hib
A: 

Try to put file int /asset folder and then do operations

success_anil
i got the solution now. thanks for reply
krunal shah