Service call does not work in apk ionic

I am having an ionic appliaction with angularjs and REST api for android platform. api services that I am using are hosted on a cloud.

when I launch it with ionic serve it properly calls all services, but when I build apk of that and install it in my phone(wifi is on) and open that, it does not call services. I have pointed to api services correctly because all services are properly called from browser with ionic serve.

previously my apk created at “…/platforms/android/ant-build/android-debug.apk” and all api are properly called from my phone.

But now only I am facing this issue. No my apk is created at “…/platforms/android/build/outputs/apk/android-debug.apk” is ionic upgraded? and because of that i m facing this issue? Please correct me what I missed out

Hey madhuri,
Please try to add to your REST API:

Access-Control-Allow-Origin : *;
Access-Control-Allow-Credentials : true;

I think the problem creates for cross domain access.

i have added whitelist plugin and it worked… Thanks… :smile:

Thanks a lot. Now I can run on android with Javascript Parse API. :smile: