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:

  • How do I use the Android Geofencing API?
  • Creating thumbnail from video file returns null bitmap
  • Retrofit - @Body parameters cannot be used with form or multi-part encoding
  • How do you force AccountManager to show the “Access Request” screen after a user has already allowed access?
  • USB OTG Supported Phones?
  • How to obtain application context from broadcast receiver?
  • 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’

    Related posts:

    How can I find the maximum texture size for different phones?
    android - How to create xml&#039;s id?
    webChromeClient opens link in browser
    Android Studio and Gradle - build fails
    How to check if dialog is displayed or display multiple dialogs of the same type?
    Android 4.4 Print to PDF without User Involvement
  • Action Bar Search View (Android) null error
  • Set selected item of spinner programmatically
  • Performance drop of Android animation when device stays still but is touched
  • Some of Bootstrap3 glyphicons are not displayed correctly on phonegap android webview
  • Regex date validation for yyyy-mm-dd
  • Saving nested foreign objects with ORMLite on Android
  • 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
    “”\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java”
    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.