Question

I have got a scripttag proxy that reads json data from a remote https url. In the emulator, on iPhones and on some android devices it works. But there are some Androids (HTC Desire and a Motrola Milestone I don't know) that doesn't work.

excerp of Kunde.js

proxy: {
    type: 'scripttag',
    url: API_URL + 'getKundenListe',
    reader: {
        type: 'json',
        root: 'kunden'
    },
    listeners: {
        exception: function(proxy, request, operation) {
            alert('exception during scripttag proxy operation');
        }
    }
},

The exception displays all the time on that android devices.

Via debug.phonegap.com I figured out that the remote device added this script tag to the head section:

<script src="https://apps.kdo.de/wuakz/json/getKundenListe?_dc=1329298561166&limit=25&callback=stcCallback1001" async="true" type="text/javascript" id="stcScript1001"></script>

On the devices that doesn't work, the script tag is two times in the head section.

The response of this request looks like this:

stcCallback1001({"kunden":[{"kdnr":"0100","bezeichnung":"Stadt Oldenburg","kuerzel":"OL"}],"status":"ok"})

I have also added the INTERNET permission to the AndroidManifest.

Any ideas on how to figure out the problem?

Was it helpful?

Solution 2

To close this out: It worked when upgrading to Android 2.3.

OTHER TIPS

If you are using phonegap there is no need to use the scripttag proxy. You can use the ajax proxy and it will work, because it's not running in a browser, so there is no such security constrain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top