Reputation: 13
I'm working on my first android game and I want to keep track of the users top 5 high scores. I'm completely stuck on how to do that though. I know it involves creating a file and using different methods to access and write to the file. But I don't know how to do any of that. I've tried looking at tutorials, but they were all too complicated. If you need more info or have any clarifying questions, please feel free to ask.
Upvotes: 0
Views: 667
Reputation: 471
For a local application, you can save your scores using files, shared preferences, or SQLite database. SharedPreferences allow saving/retrieving simple key/value pairs easily, SQLite is the most advanced but a bit harder to set up.
Overview of storage options on Android Developers
For an online game, you will need to store your scores on a server. You might want to have a look at BaaS providers such as Parse which allow you to save data with little code.
Upvotes: 1