I pull my hair on it.
I have a jquery-ajax call to my server that works in my browser, it works on my device when I connect to my local proxy server for http sniffing, but just hangs when it disconnects from my proxy server on Wi -Fi or on a cellular network.
I installed phonegap config.xml to resolve my domain. A request is a receipt on the server, as well as an ajax call. You will notice this is jsonP.
Calling direct jquery, I will still send the code. The api object is a custom object that I created to store application functionality.
var dfd = $.ajax({
url: myurl, // I've confirmed the url, but prefer to keep it private
data: {
ApplicationID: api.applicationID,
DeviceID: api.device.uuid(),
OSVersion: api.device.version(),
DeviceVersion: api.device.platform(),
Lat: lat,
Lng: lng,
Bearing: bearing
},
dataType: "jsonp",
timeout: 30000
})
.fail(function (event, jqXHR, ajaxSettings, thrownError) {
console.error(jqXHR);
});
I tried this answer closest to my problem, but it doesn't seem to work.
JQuery ajax phone query not working
-, ? ?
EDIT:
, -, ajax, , .