How to write to file

hi Asra,

your code might make sense for your project,
but please understand that you should post code here what is complete,can run,
and is just about the problem.

so i try:

String outfile = "data/text.txt";
String[] vals = {"line1","line2"};

saveStrings(outfile,vals);

from the PDE under windows 10 / processing 3.5.3
and the directory “data” was created automatically and the file with 2 lines saved.

so, now you try that 3 lines in your Android environment, i can NOT answer about that.