You can use logcat to get logs from an android app. Add console logging actions to your code, for example:
Browser Log "AJAX Requesting data"
Browser Log "AJAX Response: "&sJsonValue
console.log("aTemp=" + JSON.stringify(aTemp))
Add "AJAX On Error" event and also put some logging into it.
Export debug apk, run it, grab logcat log from the phone and search for those console messages. Also check if there are any errors or exceptions in the log which happened at the time of AJAX request.
Thanks, I just figured it out.
I made my API using PHP, but I just started using php few days ago.
I had to allow cross-domain on my apiby adding :
header("access-control-allow-origin: *");