14 Jan 2013 7:19 AM #1
Unanswered: Sencha SQLite proxy and native packaging
I'm using the new sql proxy provided with sencha touch 2.1 and it works great as long as I use it in a browser. I tested it on the native browser of my Asus transformer tablet.
As soon as I package my application in native, I get an error when I try to access webSql database throw the proxy:
01-05 21:35:47.020: E/Web Console(9939): Uncaught Error: SECURITY_ERR: DOM Exception 18 at file:///android_asset/app.js:66393
My tablet is working on android 4.0.3.
Is there something I can do to make the SQL proxy works on a native application ?
15 Jan 2013 6:37 PM #2
16 Jan 2013 1:52 AM #3
I think that this issue may be related to the webView used by sencha native packaging. I think that it is not configure to accept webSql database or it simply cannot use webSql because android 4 webView does not allow it.
Maybe an android expert can confirm that?
I solve this issue by packaging the application with Phonegap and use https://github.com/brodyspark/PhoneG...Plugin-Android to persist my data.
This is not what I wanted to do first. I would prefer to perform a full sencha build.
16 Jan 2013 2:25 AM #4
You should be able to use websql without the sqlite phonegap plugin on native. I was fine using phonegap, without that plugin, when I was working with my own proxy. Perhaps try creating the database with a lower amount of memory? 5mb worked for me.
Having said that, I'm reverting to saving json files locally and overwriting them with updates because in my experience sqlite is a complete nightmare to develop and debug with... exactly because of errors like this.
22 Jan 2013 4:06 AM #5
hi guys , make sure space that you allocated for the sqlite is less than 5 mb otherwise it will give you error ...
window.openDatabase("Database", "1.0", "Cordova Users", 3000000);
22 Jan 2013 4:52 AM #6
The database size is not the problem, I still have the same error when I package my application.
The weird thing is it's now working with phonegap packaging without using the custom sqlite plugin.
I really don't understand what is happening.
Many thanks for your answer