I made an android game and I want to know how to save player data such as money, level reached, etc. I think that XML is not a really convenient way to do this. Is there any good way to do this? Does android provide some method to save the data?
Share
A database is probably overkill for the type of data you need to track. I would suggest using Android’s SharedPreferences APIs. See here for a tutorial.
Here’s an official overview of Android data persistence methods including SharedPreferences and SQLite.
Check out the getStringSet API for storage of arrays/collections.
For non-existent vals for the string set:
For non-existent value data such as string, bool, float etc.: