Q:

When I generate .apk api calls return xhr.status = 0

I have a really strange problem when I generate .apk file of my app. 
When I do it and install my app onto an android device (nexus 4, 5, several htcs and others), all my api calls return xhr.status = 0 but If instead of doing that I use my devices as emulators and run the app from eclipse on them instead of install the app manually, everything works fine and all the api calls return  information. 
So I don't have problem with my calls, and at first sight everything is ok, but during the compilation something has to happen that makes  this problem  happen and I don't know how to settle it. 
any help please???? 
Thanks in advance. 

A:

check in your config.xml file whether you have  <access origin="*"/> in place. This is required to do cross domain api calls.