Simply serialize your ints to a string and write in a simple sqlite
database. It's rather inexpensive and compact. You don't need a
provider or things like that, just use the database helper (there's
one in some sample) to create the db and a couple of query/select
commands to store and restore.
Alternatively you can do even simpler by storing the string as an app
preference:
prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit().putString("name", value).commit();
prefs.getString("name);
R/
On Tue, May 19, 2009 at 11:24 PM, ayush <[email protected]> wrote:
>
> i'm designing a simple board game, where the positions and states of
> pieces are stored in two separate (single dimension) int arrays. i
> want to give the user the option to save the game and reload the same
> at a future time.
> is there anyway that these two arrays can be stored on the device and
> accessed later? the option of using SQL seemed a little to extensive
> since the data is just a simple array.
>
> ~ayush
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---