For the past 3 hours I've been trying to write to a file in Andoid.
This is my latest attempt:
try {
String text="alo";
FileOutputStream fos=openFileOutput("gameProg.txt",Context.MODE_APPEND);
fos.write(text.getBytes());
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
I have also tried some FileWriter method that only leads to the read-only file system error. Apart from this FileOutputStream attempt, I have deleted several others which did not have an impact on the file. Is there any way that I could write to this file (without rooting my phone)?