SenchaTouch-v2-SqliteProxy
SenchaTouch-v2-SqliteProxy copied to clipboard
Using Phonegap-SQLitePlugin i.e. real Sqlite3, not localstorage (webSQLite / indexDB)
By any chance we can use real sqlite3 database for SenchaTouch-v2-SqliteProxy?
https://github.com/davibe/Phonegap-SQLitePlugin
I think this can be easily done, by replacing this line ( in SqliteConnection.js):
me.dbConn = openDatabase(me.dbName,me.dbVersion, me.dbDescription, me.dbSize);
to:
me.dbConn = new PGSQLitePlugin("test_native.sqlite3");
It can be done like that, does android support this?
Android should suppose to easy (in theory) since it support SQLite as well. Some Android guys even manage to port Spatialite (GIS extension for SQLite3) library in Android.
PhoneGap SQLiteplugin is right now for iOS devices only (i.e. Objective-C + Javascript).
Hopefully, some guys would translate the Objective-C to Java (Android SDK) and use the existing Javascipt (PGSQLitePlugin.js from iOS).
This one is just copy an paste method, not real SQLite3 for Android.
I just place one here so people who might be interested in porting the Android PhoneGap SQLiteplugin can use this info. http://stackoverflow.com/questions/9803606/phonegap-android-java-moving-a-pre-populated-sqlite-database-assets-folde
This project has the necessary files Java Android SDK for SQLite3/Spatialite.
https://github.com/mrenouf/android-spatialite
Somebody would like to knit pick those functions and assembly a Android PhoneGap SQLite plugin.
https://github.com/mrenouf/android-spatialite/tree/master/src/jsqlite
For sure this one of the file. https://github.com/mrenouf/android-spatialite/blob/master/src/jsqlite/Database.java
Noli