AJAX Request from Phonegap Android fails

You should whitelist the domain in order for your AJAX calls to work.

Add this line to config file -:

<access origin="*" />

Phonegap’s default policy blocks all network access unless specified otherwise. The above line will disable this security restriction. You can also be more specific in allowing only certain domains to bypass this security feature by including the domain name in the config file like so

<access origin="http://yourdomain" />

Leave a Comment