Hi, i have a very very very weird problem. When i connect my android phone to my Mac, and deploy the app i'm building, directly, it works... but i i install the APK in the folder: projectname/build/android/bin, it does not work, at all. The App just does nothing then trying to establish a request to my server, but that only happens when i used the APK, why? i have several days with this problem and i'm just giving up. this is the code, thanks a lot.:
var xhr = Ti.Network.createHTTPClient(); var data = { "user": $.emailTf.getValue(), "password": $.passTf.getValue(), "genre": $.sexPicker.getSelectedRow(0).title, }; data = JSON.stringify(data); //On Load xhr.onload = function(e){ var response = JSON.parse(this.responseText); }; xhr.onerror = function(e){ }; xhr.open("POST", "url"); xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8"); xhr.send(data);
Titanium Studio, build: 3.4.1.201410281727 (c) Copyright 2012-2014 by Appcelerator, Inc. All rights reserved. Build: jenkins-titanium-rcp-master-202 (origin/master) Date: 28 October 2014, 17:28:23 Titanium SDK: 3.5.1 GA. OS X Yosemite version 10.10.2