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

Apr 09, 2015 · by Tim Kamanin

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!

Want to get more 🔥 tips like this one?

Subscribe to get notified about new dev tutorials