On my computer if the code works, but when I run on my android does not work (if I have internet access in the Manifest).
here my code C #
public class LoginMenu : MonoBehaviour {
public TextMesh Debugt;
string loginURL = "keep.com.co/DepartamentoDesarrollo/Arthur/ApplicacionMovil/login.php";
string username = "";
string password = "";
string label = "";
void OnGUI() {
//GUI.Window (0, new Rect (Screen.width / 4, Screen.height / 4, Screen.width / 2, Screen.height / 2 - 70), LoginWindow, "Login");
GUI.Label (new Rect (140, 40, 130, 100), "~~~~Username~~~~");
username = GUI.TextField(new Rect(25, 60, 375, 30), username);
GUI.Label (new Rect (140, 92, 130, 100), "~~~~~Password~~~~");
password = GUI.PasswordField (new Rect (25, 115, 375, 30), password, '*');
if(GUI.Button (new Rect (25, 160, 375, 50), "Login")){
StartCoroutine (handleLogin (username, password));}
GUI.Label (new Rect(55, 222, 250, 100), label);
}
void LoginWindow(int windowID) {
}
IEnumerator handleLogin(string username,string password){
string loginURl = this.loginURL + "?username=" + username + "&password=" + password;
WWW loginReader = new WWW (loginURl);
yield return loginReader;
if (loginReader.text == "successsuccess") {
Debug.Log ("correcto"); Debugt.text = "D: "+"Correcto";
}
if (loginReader.text == "successNope") {Debug.Log("incorrecto");Debugt.text = "D: "+"incorrecto"; }
Debug.Log (loginReader);
Debugt.text = "D: "+loginReader.text.ToString();
}
}
help my if for my Job ( i need in Android and iOS)