简体   繁体   English

Android游戏,有关存储用户数据的选项

[英]Android game, options about storing user data

I'm developing a little game for android and i'm at the point where i want to save data of the progress the user has made so far. 我正在为Android开发一款小游戏,当时我想保存用户到目前为止所取得的进展的数据。

I read about sharedpreferences, SQLlite... i have used some XML parsers aswell but my question is, if i want this: 我阅读了有关sharedpreferences,SQLlite的信息……我也使用了一些XML解析器,但是我的问题是,如果我想要这个:

  • Fast performance. 快速的性能。
  • Secure or encryptable. 安全或可加密。

I want to point out that the data to save is not very long, profile name, levels completed, faction selected... 我想指出的是,要保存的数据不是很长,配置文件名称,完成的级别,选择的派系...

Thanks in advance! 提前致谢!

Any solution will be "fast enough" for loading/saving the data... and any of them will be encryptable (as in they can all store string data). 任何解决方案都将“足够快”地加载/保存数据...并且它们中的任何一个都是可加密的(因为它们都可以存储字符串数据)。

SharedPreferences would probably be the simplest way to go. SharedPreferences可能是最简单的方法。 Perhaps store your data as JSON, then store the entire JSON string in SharedPreferences. 也许将数据存储为JSON,然后将整个JSON字符串存储在SharedPreferences中。 Then you can easily add encryption to it later. 然后,您以后可以轻松地对其添加加密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM