I am making a small game and I want to save all the variables (objects and basic types) when closing the app to be able to load the saved game later on.
Here are some of the variables:
String playerName;
Duration time;
Item[] inventory=new Item[20]; //enum
int inventoryTotalItems=0;
It is basically the same situation than save variables after quitting application? or How can I save an activity state using the save instance state? but what I want to save are Objects, so I am not sure I can use the preferences or the Bundle for that. I also will want to store more than one preference to be able to load different saved games. Can I do this with onPause() and onResume()?
Thanks.