10-01-2012 02:17 AM
I am trying to develop a fairly simple app where the data is available as Json feed from the website and a simple html page show the data.
I am using PhoneGap 2.1.0, JQuery Mobile and WebWorks 126.96.36.199.
<access subdomains="true" uri="*" />
I am faced with following two issues with my 9930 simulator for OS 5:
==> My ajax requests fail with "Request Timed our after ~12000 error" for manaul XMLHttp requests.
==> The simulator while loading gives an error "Windows Command Processor Failed"
Here is the code I am trying out:
httpConnection = new XMLHttpRequest();
var me = this;
if(httpConnection.readyState==4 && httpConnection.status==200)
10-04-2012 01:18 PM
Here are few suggestions.
First of all, instead of using the <access subdomains="true" uri="*" />, can you try specifying the actual domain?
And also, when working with phonegap, make sure to use the blackberry version of phonegap.js.
Let us know if this helped or not.
10-04-2012 02:34 PM
Thanks for the reply.
I had tried the <access> suggestion you made, also indeed using the blackberry version of phonegap.js. Found that even <img> tags are not working.
Solved it by developing a custom phonegap plugin for downloading data and images. Images have to be base64 encoded so that the <img> tags can be fed encoded image rather than a url.
Thanks again. If you find a method to make the normal ajax / img src tags work, do let me know.