Hi,
in my mobione app I use pouchdb 2.2.3 to create a nosql db locally and replicate with a remote server.
On my mobile samsung galaxy s2 Android 2.3.3 everything works great.
But now I discovered, that this configuration does not work on samsung galaxy s3 with Android 4.0.4.
The folowing error occures: error: security_err dom exception 18
Investigating the problem I found that the problem may occure on android 3 and above. IOS sould work in general.
I found suggestions to use the sqlite plugin so that pouchdb uses sqlite instead of other approaches (indexeddb, websql).
This site explains in general how to set up the plugin http://www.creativedev.in/2013/09/to-setup-sqlite-for-android-phonegap-application/
My question now is , how can I perform the suggestions on this site in the mobione environment.
In the site above is said
1. put the files SQLite.js,qunit-1.5.0.js and SQLite.coffee to the js folder
–> from my point of view in the mobione context, I have to add them to a folder of my choice and add the files to the .mobi file (JavaScript Libraries-Property)
2. Add the plugin file of SQLite into src folder –> is this the projects-folder inside the www-folder ?
3. Go to xml folder and open config.xml and place below line of code:
<plugin name=”SQLitePlugin” value=”com.phonegap.plugin.sqlite”>
–> where is the right place in the mobione context to place the above code
4. Now pouchdb should be able to use it
From Pouchdb documentation:
SQLite plugin for Cordova/PhoneGap
On Cordova/PhoneGap, it is often more performant to use the native SQLite database rather than the WebSQL database. This is also a good way to avoid HTML5 storage quotas.
Luckily, there is a SQLite Plugin that accomplishes exactly this. If you include this plugin in your project, then PouchDB will automatically pick it up based on the window.sqlitePlugin object.
Any help would be VERY appreciated !