Ich entwickle Android Apps auf Cordova. Ich habe einen JQuery AJAX-Aufruf an meinen Server, der in meinem Browser funktioniert, funktioniert auf meinem Gerät, wenn ich es mit meinem lokalen Proxy für HTTP-Sniffing und lokale Wi-Fi verbunden ist, aber nur hängt, wenn es von meinem Proxy auf dem Wifi ist oder im Zellennetzwerk.Ajax Anruf auf Cordova nicht senden Anfrage bei der Verwendung von Mobilfunknetz
AJAX-Code:
$.ajax({
url: 'http://192.xxx.x.xx/xxxApi/api/controller/GET?jsonData='
+ JSON.stringify({
'SecurityCode': z.toUpperCase(),
'LoginID': x,
'password': y
}),
type: 'GET',
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
cache: false,
success: function (data) {
var userName = data.UserName;
config.xml
<content src="index.html" />
<access origin="*" />
<plugin name="cordova-plugin-whitelist" version="1" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
Gibt es etwas, was ich vermisst habe? Was mache ich falsch?