I wrote this code:
var xhr = Ti.Network.createHTTPClient();
xhr.onerror = function(e){
alert(this.status);
}
xhr.onload = function(){
//Titanium.API.info("risposta = " + this.responseText);
};
xhr.setValidatesSecureCertificate = false;
authstr = 'Basic ' + Titanium.Utils.base64encode(textFieldUser.value + ':' + textFieldPass.value);
xhr.open("POST", 'https//miourl.php');
xhr.setRequestHeader('Authorization', authstr);
xhr.setRequestHeader('Content-Type', 'text/xml');
xhr.send(xmlSendParam);
If I start the emulator or I click on Android Device works correctly. If I click on distribute and I install l'apk on device, authentication fails. I use sdk 2.1.3.GA and I compiled with Android 2.2. What's wrong?
Your Answer
Think you can help? Login to answer this question!