In my project I have to manage large quantity of static text data(ie no modification, deletion or addition of data, only for displaying and it is based users need). To implement this I have two solutions.
- Saving entire text data in to database, to do this I have to keep an xml file that containing text data into
assetfolder, and during theonCreateof database I have to fetch each text data from file and insert into database. - Saving text data into several xml file in
asset, and keep the xml file name into database.
In both case I have to keep database because I want to store some flag element for each text data according to users needs. My question is which is the best method from above? or Is there any other best method?
I think you should create a read only database using Sqlite browser and put in assert folder and when your application execute for the first time the entire database will be copied from assert folder to the Android root database folder .
Here is link to do this ..
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/