hi guys i'm trying to connect to my web page on server. i have checked my code there are no mistakes in it and it works on the emulator but i get force close on the actual device and the in log it says unknown host exception. did any one else run into this.
Error in http connectionjava.net.UnknownHostException: my.url.com
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://my.url.com/test/stock.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection"+e.toString());
}