Making Ajax Request On Android Returns No Transport Error
I have developed a sample app on Android using Phonegap. When clicked on a button, an Ajax request is made to the server (http://192.168.0.199:8080/test.php). The test.php just ech
Solution 1:
Looks like you are trying to make an call to a client within a local network. Try validating you have access to that local network.
Solution 2:
As of jQuery 1.5 a new AJAX / XHR implementation is in use. And Android 1.5 / 1.6 doesn't say it supports CORS (crossdomain calling). So a way to 'fix' that is to inform jQuery it does support cors:
jQuery.support.cors = true;
I couldn't reproduce the problem on 2.1 and up. So I expect the XHR implementation from that version on does say it does support cors.
Post a Comment for "Making Ajax Request On Android Returns No Transport Error"