I already looked for an answer here but none applied to my particular case. I have an arrayList
ArrayList<GridItem> gridItems = new ArrayList<>();
To which the user can add entries through interacting with the app. I understand that SharedPreferences doesn't work with objects and I can't get gson to work.
I would like to save the arraylist in onPause and look for a preexisting saved list in onCreate. Is this the correct approach?
EDIT: I should clarify that each entry is made of two string. This is the obj constructor:
public GridItem(String Name, String Path){
mName = Name;
mPath = Path;
}
so each entry is basically like this:
gridItems.add("a name", "/sdcard/emulated etc etc")