How to save read-only data on android? [closed]


I am developing an Android app that performs about 100 questions (a test) and would like to know which is the most recommended way to save the title of the question, the options and the correct answer to access this data from the Activity, I do not know if I save them in an xml, in an sql file, in an array of static and final string from java, in an array in strings.xml, etc. Although I think that any of these would serve me for the same, I do not know which is the best in terms of performance to access data faster ...

asked by Sneyder Angulo 09.07.2016 в 22:35

1 answer


The correct way in which you should do this is using SQLite but it is not something that can answer you here with examples since it is a relatively extensive issue but not very complicated if you already have bases in SQL.

I leave this league, I personally learned here: link

It is a very complete tutorial, that you do not get lazy, cheers !, SQLite is something very used in Android, so if you are going to start developing apps that require saving information in the memory of the phone the best practice is to do it with SQLite.

There is also the option of web services, create them, pick them up and consume them from your app, but you need that technical knowledge and a requirement is to have an internet connection on your phone.


answered by 09.07.2016 / 22:59