File saving to flash memory and/or SD card
in
Android Processing
•
1 year ago
Hi
Been making good use of this forum for a few months now and have found loads of useful info on all sorts, and also to some extent to help me with saving files on android... but now I'm stuck.
On a PC it seemed very easy to use createOutput() to get a file path string and then use this with saveString() to write a txt file any where I want to, but on Android createOutput() doesn't work so I am assuming I need to specify a path.
After reading here and elsewhere I hoped the solution(s) would be:
String[] myarray = {"one", "two", "three","four"}; // the array to be saved
saveStrings("\\sdcard\\myarray.txt", myarray); // save to SD card
OR
saveStrings("\\sdcard\\documents\myarray.txt", myarray); // to save to the 'documents' folder already on the SD card
OR
saveStrings("\\sdcard\\newfolder\myarray.txt", myarray); // to create 'newfolder' and put 'myarray' in it
But it doesn't work, so I'm after help from someone who knows :)
hopefully()
Mark
1