I needed to prepopulate a database file for a Phonegap project that I was working on. My database was 10mb, so loading it from a SQL file via AJAX on the first launch was not an option. After many hours, I finally figured out how to do it. Enjoy! I hope this can be useful to some of you. Materials Required: PhoneGap https://github.com/chbrody/Cordova-SQLitePlugin/ Android Version, I used version downloaded on 8/7/2012. Versions differed a lot for me in updates. For example, the latest version automatically appends “.db” to your window.sqlitePlugin.openDatabase()…

Read More