Libgdx Quiz- Using SQLite Database?

与世无争的帅哥 提交于 2019-11-28 11:44:27

问题


I have been learning Android development and using the Libgdx framework for over a month now and want to create a test app. The app i want to create is a quiz and im stuck on the situation on how i am going to store all the questions, answers.

Being a web developer for many years i of course thought of a database but libgdx doesn't have much support for sqlite which leaves me stuck on how to achieve the storing without using a database.

Does anyway know any way to use sqlite with libgdx or how i can achieve this another way, i would appreciate the help, thank you.


回答1:


I would not go with SQLite in this case. Since it is just a test app and you probably won't have millions of questions and won't need to do any kind of querying, I'd suggest you to use JSON to store your questions.

The JSON support of LibGDX is pretty good and it works on all platforms as well. Have a look at the wiki to see some examples of how to use it.

Furthermore it means that you can easily edit your questions, since it is a human readable file format.



来源:https://stackoverflow.com/questions/22518300/libgdx-quiz-using-sqlite-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!