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<file:///\\android_asset\www\index.html#/login>
 (0)

Muly
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to