Skip to content Skip to sidebar Skip to footer

How To Save An Array Of Simple Objects In My Android App?

I'm currently creating my first android app and I've a simple class 'Player' I want to save a few instances (a dozen or two) of that consist of 5 ints. All I wish to use them for i

Solution 1:

If you want easier solution then go with JSON or SharedPreferences. Easier to parse and easier to store.

Here is an example code I've uploaded for you. ObjectSavingTest

Solution 2:

I think you can create a SQLite database with 12 rows and 5 columns.. for 5 integers in your class.. and rows for your player names..

Post a Comment for "How To Save An Array Of Simple Objects In My Android App?"