问题
I am working on android quiz game and dont know how to write code that save score of every user at the end of game with differnt id on server side. So that i can check the winner with highscore after some days. I prefer to use sqlite database but dont know much about this. If someone know about this problem plz help me with example of some code.
Thanks in advance!
Anyone have better answer than this?
回答1:
There are different storage options available in android. Choose the one that suits you the best.
As far as Sqlite, Yes its good option for storing structured data in a private database. Go, through this simple Sqlite sample here , here and here
If you want to maintain achievements, leaderboards, and real-time multiplayer stats to your mobile then Google Play Games services should be your option as rightly mentioned by @MarvinLabs.
回答2:
You should use the Google Play Games services. That provides all you need and sample code.
https://developers.google.com/games/services/
来源:https://stackoverflow.com/questions/18720544/how-to-save-score-on-server-side-with-different-ids