good afternoon. my game through ajax communicates with the server. the server has an Access-Control-Allow-Origin policy: *
I exported the project and checked it on the local server, it exchanges data with the remote server, everything works. I build a project for android-ajax does not work with the remote server. I checked it in the android studio, and got this error in the logs: "[Construct 3] AJAX request to 'http: // ********' (tag 'Check_connect') failed: "
checked permissions by adding code like this:
var permissions = cordova.plugins.permissions;
permissions.checkPermission(permissions.INTERNET, function( status ){
if ( status.hasPermission ) {
console.log("Yes :D ");
}
else {
console.warn("No :( ");
permissions.requestPermission(permissions.INTERNET, PremmSuccess, PremmError);
}
});
function PremmError() {
//alert('NO');
}
function PremmSuccess( status ) {
if( !status.hasPermission ) PremmError();
}
I get "Yes: D" in the logs. What could be the problem?