whitelist not working ionic with crosswalk

I created a working app using ionic. there was no problem with fetching data from my site and everything was good.

I then went to add crosswalk to it and now i get the error when i run it on my android phone:

  • Failed to create BuildConfig class error message in eclipse
  • How to prevent an application from being uninstalled?
  • Fullscreen Web App for Android
  • Can an Android NFC phone act as an NFC tag?
  • Accessing body string of an OkHttp Response twice results in IllegalStateException: closed
  • Communicating between a fragment and an activity - best practices
  • W/XWalkCordovaResourceClient():URL blocked by whitelist: http://example.com/api/

    In the top level config.xml i have tried each of the following (not all 3 at once) and reran it (ionic run android) with the same results:

      <access origin="*"/>
      <access origin="http://www.example.com/*"/>
      <access origin="http://www.example.com"/>

    What am I doing wrong?

    running ‘ionic info’ i get:

    OS: Max OS Yosemite
    Nodoe Version: v0.10.36
    Cordova CLI: 4.3.0
    Ionic CLI Version: 1.3.19
    Xcode version: Xcode 6.2 Build Version 6C121e
    ios-sim version: 3.1.1.

    As a separate but possible related question, after installing crosswalk running the app on an android emulator has stopped working also – after building successfully it just says ‘the app has stopped’

  • how to url encode in android?
  • usb devices android, c# Xamarin
  • Alpha-gradient on Android
  • Android Packaging Problem: resources.ap_ does not exist
  • Stop scroll on CollapsingToolbarLayout so it doesn't completely collapse
  • How can I add gradient effect to background color of TextView in a ListView?
  • 2 Solutions collect form web for “whitelist not working ionic with crosswalk”

    I figured it out! The problem is that in the latest Cordova, they’ve split out the whitelist functionality into its own plugin.

    Simply run ionic plugin add https://github.com/apache/cordova-plugin-whitelist.git
    and you’re good!

    I had problems getting tiles from openstreetmaps and google maps api and i solved it by followed the answer from this thread http://forum.ionicframework.com/t/crosswalk-whitelist/20329.

    Basically the workaround is to go to
    line 204, comment the return out and rebuild the app.

    Its not a smooth solution but it solves my problem for now.

    In regards to your other question the steps i would suggest is to first : Emulate using Genymotion. If that doesnt work i would try to remove and re-add Android.

    Hope it helps.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.