【发布时间】:2011-08-29 18:47:49
【问题描述】:
我有两台 Android 移动设备,一台 v2.3 api 9 和一台 v3.1 蜂窝 我想为短信代码发布一个 http api 链接。原来我在蜂窝中遇到错误,而其他手机工作正常这是代码
public void sendSMS(String phone_num, int password)
{
try
{
HttpClient hc = new DefaultHttpClient();
HttpPost post = new HttpPost("http://www.google.com/");
hc.execute(post); // I got an error here
}
catch(IOException e)
{
Log.e("error", "error");
}
}
【问题讨论】:
标签: android apache http post android-3.0-honeycomb