3G에서는 잘되는데요
wifi연결상태에서는 서버를 찾지 못합니다.
소켓타임에러가 나는데요
이게 됐다가 안됐다가 하는데 안돼는 확율이 70% 됩니다.
웹브라우저라든가 다른 인터넷을 사용하는 어플들은 wifi에서도 잘됩니다.
왜 그런지 아시는분 계신가요?
아래 소스입니다.
try
{
HttpClient client = new DefaultHttpClient();
String postURL = "http 주소";
HttpPost post = new HttpPost(postURL);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("param1", "android"));
params.add(new BasicNameValuePair("param2", "test"));
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params,HTTP.UTF_8);
post.setEntity(ent);
HttpResponse responsePOST = client.execute(post);
HttpEntity resEntity = responsePOST.getEntity();
if (resEntity != null)
{
Log.i("RESPONSE", EntityUtils.toString(resEntity));
}
}
catch (Exception e)
{
e.printStackTrace();
}
드믈긴 한데 3g만 접근 가능 하게 구축된 곳도있구요