I have an array of custom objects called AccActivity.
public class AccActivity {
AccData Data;
AccData fData;
AccData lpfData;
int[] crossings;
float[] sd;
int type = -1;
private float[] minMax;
float spread = 0.30f;
int rate = 8;
float alpha = 0.30f;
float avResAcc;
float[] peakDistances;
int[] peakNumber;
ArrayList<Integer> peakIndicesX;
ArrayList<Integer> peakIndicesY;
ArrayList<Integer> peakIndicesZ;
And the AccData object looks like this:
public class AccData {
private ArrayList<Float> xData;
private ArrayList<Float> yData;
private ArrayList<Float> zData;
private float[] averageNoise;
Now, I have researched the problem on the internet and apparently there are three options of storing data in android - all of them seem not to be suitable for me
SharedPrefs - no, because its for storage of primitive key value preferences
Serialisation - saving to file - not sure - I only saw examples where it was used on non-custom object types, how would I come around it?
SQLite - no, another answer on stack overflow said: "How can I store my custom object in a database ?
You don't, unless you are using an object database. You store a representation of the object in a database."
What is this object database that they mention?
Can somebody tell me how to save and retrieve this arrayList that I'm having?
EDIT: I don't care about SDK compatibility and can select the highest one as this is an individual research project
EDIT2: Goal: After turning the phone off and back on, I want the ArrayList data to be automatically retrieved when I open the app.