我有两个Android移动设备一个v2.3 api 9和一个v3.1蜂窝我想发布sms代码的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");
}
}
Run Code Online (Sandbox Code Playgroud)