Reputation: 6575
I have an array of objects in my Android app which I would like to store persistently. The options I'm aware of are:
I really want the simplest and cleanest implementation. Is #3 even feasible? I haven't found any discussion of that, although that is the solution I used on my iPhone version of the app.
Upvotes: 0
Views: 357
Reputation: 36641
In Java, the trick is to implement the interface Serializable. As long as the entire object graph you're trying to serialize contains only objects that also implement Serializable, the default serialization algorithm can use reflection to generate the byte stream for you, and you can output it to anything that can accept a byte stream
Upvotes: 1