Using Save() Methods

This vexed me for a bit. Most of the solution were incomplete or too wordy.
This is it in a nutshell:
To save data on an Android using, saveTable(), saveStrings(), etc. This is how to do it.

String[] data; // Assign data type to the variable receiving the data
String file = “file name”; // Assign the file name to a string variable

 // Assign the data you want to save to a variable. 
 //How you do it depends on the type of data you want to save

saveStrings(sketchPath(file), data); //the sketchPath() method must be used here
data = loadStrings(sketchPath(file)); //the sketchPath() method must be used here

I used Strings(load and save) as an example, but this will work with Tables, Images, etc.

Think Positive

1 Like