-
14 Jan 2013 7:19 AM #1
Unanswered: Sencha SQLite proxy and native packaging
Unanswered: Sencha SQLite proxy and native packaging
Hi all,
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:
Code: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 ?
Thanks
-
15 Jan 2013 6:37 PM #2
-
16 Jan 2013 1:52 AM #3
Nice to see that I'm not alone with this problem.
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
-
27 Jan 2013 4:37 PM #7
Hei friends take a look:
https://github.com/brodyspark/PhoneG...Plugin-Android (native sqlite not web)
https://vimeo.com/bricemason/videos
videos:
Using Sencha Cordova Builder
Using Phonegap Android Plugins with Sencha Touch
Building Android Applications with Sencha Touch and PhoneGap
-
3 May 2013 7:58 AM #8
Same problem for me ! Works perfect on iphone but not on android devices.
I think sencha touch is not use android webview correctly cause it's use file on webview like file://android_asset/index.html and this kind of URL can't have webSQLite database.
Correct url to be able to have webSQLite database is http://localhost/index.html
Maybe i'm wrong and sencha team can tell us the problem.


Reply With Quote
