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();