[ 
https://issues.apache.org/jira/browse/CB-9040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eason Shen resolved CB-9040.
----------------------------
    Resolution: Fixed

The problem due to the lastest release in cordorva [email protected] revamped 
whitelist feature to an external plugin naming `cordova-plugin-whitelist`
`cordova plugin add https://github.com/apache/cordova-plugin-whitelist.git` 
could solve the problem.
the <access origin="*" /> only works when the plugin is added.
https://github.com/driftyco/ionic/issues/3597

> it is not able to send any XMLHttpRequest in Android device
> -----------------------------------------------------------
>
>                 Key: CB-9040
>                 URL: https://issues.apache.org/jira/browse/CB-9040
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: 5.0.0
>         Environment: Android 4.1/4.3
>            Reporter: Eason Shen
>              Labels: ajax, xmlhttprequest
>
> I've ran app by 'cordova run android' and it runs in my Android device, and 
> it is not able to send any XMLHttpRequest to the remote server, but it works 
> in Chrome(server response CORS:*).
> I use angular $http at first, and then zepto.ajax, at last I tried original 
> XMLHttpRequest object.
> The request returns immediately with no actual request sent to the server, 
> the server never receives any request and I've also do the capture work (via 
> fildder), no packet passed through it.
> Also there is no status code (maybe 0), but I can't confirm if there is any 
> js error.
> I've tried 3 devices, and neither of them passed.
> Testing code below:
> var request = new XMLHttpRequest();
> request.open("GET", 
> "http://wx.ujietrip.com/service/rest/common/manufactuers/";, true);
> request.onreadystatechange = function(){//Call a function when the state 
> changes.
>                 alert("state = " + request.readyState);
>                 if (request.readyState == 4) {
>                     alert("*" + request.responseText + "*");
>                     if (request.status == 200 || request.status == 0) {
>                         console.log("*" + request.responseText + "*");
>                     }
>                 }
>             }
> request.send();



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to