I found this line line in CordovaWebView:271 if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
As the problem is with API15 (ICE_CREAM_SANDWICH_MR1) and not later API I modified it to be if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) And it seem to work fine for API15 (4.0.3) emulator, didn't tested on real device yet Any idea why the line was limited for API15 Muly On Wed, Jun 4, 2014 at 4:38 AM, Zhu, Yongsheng <[email protected]> wrote: > Muly, > > I guess you may get XWalkSettings from XWalkView instance. There is one > method called “setAllowUniversalAccessFromFileURLs(boolean)” in > XWalkSettings. You could pass ‘true’ value to enable cross origin XHR for > your case. > > Please let me know if you have further problems. > > > > Thanks for trying Crosswalk. > > > > Yongsheng > > > > *From:* Crosswalk-help [mailto: > [email protected]] *On Behalf Of *Muly > Oved > *Sent:* Tuesday, June 03, 2014 3:33 PM > *To:* [email protected] > *Subject:* [Crosswalk-help] Access-Control-Allow-Origin error on Android > 4.0.3 (OK on 4.4.2) > > > > Have a Crosswalk/Cordova application doing login using Google OAuth API > > > > When running on Android emulator version 4.0.3 API Level 15 I > get Access-Control-Allow-Origin error > > > > When running the same project on Android emulator version 4.4.2 API Level > 19 it work fine > > > > The project itself use Google API 4.4.2 API 19 > > Crosswalk version: crosswalk-cordova-6.35.131.7-x86 > > > > Error message: > > 06-03 06:22:59.891: I/chromium(1397): [INFO:CONSOLE(0)] "XMLHttpRequest > cannot load https://accounts.google.com/o/oauth2/token. No > 'Access-Control-Allow-Origin' header is present on the requested resource. > Origin 'file://' is therefore not allowed access.", source: > file:///android_asset/www/index.html#/login (0) > > > > Muly >
_______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
