• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Error on executing Http post in honeycomb

Osama Ahmad

Lurker
Feb 23, 2011
9
0
I have two Android mobile devices one v2.3 api 9 and one v3.1 honeycomb I want to post an http api link for sms code. It turns that i got an error in honeycomb and the other mobile works fine this is the code

Code:
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");
}  
}
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones