JavaScriptJavaScript

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

Apr 09, 2015 · Updated: Nov 10, 2017 · 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!

Hey, if you've found this useful, please share the post to help other folks find it:

There's even more:

Subscribe for updates

  • via Twitter: @timonweb
  • old school RSS:
  • or evergreen email ↓ ↓ ↓