Android append text file

I figured it out….I had to change the line

FileOutputStream fOut = openFileOutput("savedData.txt", MODE_WORLD_READABLE);

to

FileOutputStream fOut = openFileOutput("savedData.txt",  MODE_APPEND);

After that I was able to append the text file without overwriting the data that was already inside the text file. Thanks for your assistance guys. I guess going to the 4th page on google IS useful sometimes.

Leave a Comment