I am new to android and trying to develop my first app. In my app, I have a listview activity that lists a group of stores. When the app users (anyone who downloaded the app)
I would write the values to file using an ObjectOutputStream:
public static void saveArray(String filename, String[] array) {
try {
FileOutputStream fos = openFileOutput(filename, Context.MODE_PRIVATE);
ObjectOutputStream out = new ObjectOutputStream(fos);
out.writeObject(array);
out.flush();
out.close();
} catch (IOException e) {}
}
Then edit the above to save word counts as an int (or short) array.