Hey all,
Just wanted to see if anyone had any ideas or experience with what I'm doing here. We are creating an app that will be packed with an offline large local Sqlite database. Large as in possibly multiple gigs. My current test db is 114 megs. On the companion app, the Sqlite plugin works great and is connecting to my db and pulling the data great. However, since the Sqlite plugin does not work in the simulator, the code is falling back to the PhoneGap api and that api does not seem to be working correctly for me. It may be size restrictions, may be how I'm opening, but I think it's probably creating a new db instead of opening the local db. I've searched around but cannot find any resources that match closely enough with my scenario to know whether I am doing something incorrect for an existing db vs. a new db or local storage.
openDb:
function
() {
if
(window.sqlitePlugin !== undefined) {
alert(
'Sqlite'
);
db = window.sqlitePlugin.openDatabase({ name:
"cdrom.db"
, location: 2 });
}
else
{
alert(
'WebKit'
);
// For debugging in simulator fallback to native SQL Lite
db = window.openDatabase(
"cdrom.db"
,
"1.0"
,
"Cordova Demo"
, 120000000);
}
}
I would also be interested in knowing if, for the companion app, there is a good way of signaling to the app that some files don't need to be re-downloaded/updated. As you can imagine, it is not quick to download a hundred meg database across most any network. I could try directly connecting the device and updating that way but if there are any tricks here, I'd welcome hearing them.
Thanks!
Adam.g