I am trying to connect an android app to a php script on a local wamp server so that i can authenticate the user.Everything is fine except that the android app cannot connect to the server.What might be the problem?No error is displayed. Here is the code block from where am trying to connect to the server.
try{
response=CustomHttpClient.executeHttpPost("http://10.0.2.2/login.php",postParameters);
res=response.toString();
res=res.replaceAll("\\s+","");
if(res.equals("0")) {
userverified=false;
}
else {
String usern=username.getText().toString().trim();
//session.createLoginSession(usern,res);
userverified=true;
}
}
catch(Exception e){
flag=true;
//error.setText(e.toString());
}
The result is the exception being called. The exception is java.net.socket Exception:Permission denied