How to save score on server side with different Id

2019-09-01 23:00发布

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?

2条回答
叛逆
2楼-- · 2019-09-01 23:40

You should use the Google Play Games services. That provides all you need and sample code.

https://developers.google.com/games/services/

查看更多
聊天终结者
3楼-- · 2019-09-02 00:00

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.

查看更多
登录 后发表回答