Ajax Request Doesn't work on Android. But, it works on other platforms including the Android browser

Greetings,
I have an Ajax request that returns JSON objects. It works like magic on all the platforms apart from the Android. And it also works on the Android Browser.

I’ve set allow navigation and allow intent and origin with * in the config.xml. But still does not work.

This is the sample:
$.getJSON(api_url+“read/allcategories.php”, function( data ) {
console.log(data)
}).fail(function (data, textStatus, xhr) {
alert('ERROR '+ data.status);
alert('STATUS '+ xhr)
}).always(function () {
alert(“ENDED”)
});

It returns an error code 404 and a status of not found!
Any idea what went wrong? Thanks

Can you add console.log(api_url); just before $.getJSON and watch for the output?

Also please note that in your post there are curly quotes around read/allcategories.php instead of regular double or single quotes. Don’t know if this is in your code as well, that might cause several problems.

I’ve done the console.log(api_url) and it’s showing my https:// URL correctly. The curly quotes is from the forum text editor.