Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Android SQLite development

Android SQLite development

modemancer
modemancer
Codex of the Modemancer · · 1 min read
1,765 1
Spent some time getting to know SQLite a bit better tonight. I have code that reads an xml file and drops the data into a sqlite database. That works fine, but what I needed was to be able to 1. Create the database from the XML prior to distribution (wasteful to send xml with the program only to be written into the db), and 2. install the database during the initial use of the program. Did some digging around online and found some great resources on stackoverflow.com. The main issue I need to work out now is when I want to update the database in the future, meaning add additional tables, I need to be able to do that without blowing away other tables. I think I'll just start with a base db file, say database1, and when I want to update, i'll call it database2. During installation, maybe I can have the software copy database2 onto the device, open it, compare with database1 tables, and copy over any tables not already present, then delete database2.

Discussion

Loading comments...