If Your Ionic + Android / Crosswalk App Has Stopped Getting Data From a Remote Server Then Read This

09 Apr · by Tim Kamanin · 1 min read

If you've enabled crosswalk browser for your Ionic based Android app and it suddenly stopped getting data from requests sent via $http that means that you've been automatically upgraded to Cordova 4.0 and in this version Cordova implements a whitelist policy for navigating the application webview via external plugin (before that, Cordova handled the issue by itself).

So, actually, all you need to do to fix the problem is:

1) to install cordova-plugin-whitelist plugin by running this command inside your ionic app dir:

ionic plugin add https://github.com/apache/cordova-plugin-whitelist

2) and add navigation whitelist setting to your apps's config.xml:

<access origin="*"/>

You can change origin from allow all ("*") to your rest api server address.

That should be all, good luck!

Comments

Required for comment verification



Adwolgan

Thanks your solution works perfectly

Reply · 2 years, 4 months ago
Rakonda

Thank you, i got this issue with $http requests and your solution is working (y)

Reply · 2 years, 8 months ago