I have an app built on Sencha (1.1) + PhoneGap (2.9). It uploads images via an AJAX call using Ext.Ajax, which can sometimes take >60 seconds. On iOS this is fine, but on Android the request fails after 60 seconds, with an empty response. The call looks like this:
Ext.Ajax.request({
url: /* snip */,
headers: /* snip */,
xmlData: xml,
timeout: 180000,
method: 'POST',
success: function (response, opts) {
/* snip */
},
failure: function (response, opts) {
/* snip */
}
});
I tried implementing this using $.ajax, with the result that both iOS & Android would timeout after 60 seconds. How can I get around this 60s timeout on Android?
Thanks, Stuart
I've had problems with ajax requests timing out in certain browsers, you could try using filetransfer instead: http://cordova.apache.org/docs/en/2.9.0/cordova_file_file.md.html#FileTransfer