1. Are you ready for the Galaxy S20? Here is everything we know so far!

Error on executing Http post in honeycomb

Discussion in 'Android Development' started by Osama Ahmad, May 20, 2011.

  1. Osama Ahmad

    Osama Ahmad Lurker
    Thread Starter

    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 (Text):
    1.  
    2. public void sendSMS(String phone_num, int password)
    3. {
    4. try
    5. {              
    6.     HttpClient hc = new DefaultHttpClient();
    7.     HttpPost post = new HttpPost("http://www.google.com/");
    8.     hc.execute(post); // I got an error here    
    9. }
    10. catch(IOException e)
    11. {
    12.  
    13.     Log.e("error", "error");
    14. }  
    15. }
    16.  
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...
Similar Threads - Error executing Http
  1. Danilo Pazzelli
    Replies:
    1
    Views:
    207
  2. unet
    Replies:
    0
    Views:
    217
  3. codezer0
    Replies:
    5
    Views:
    268
  4. Yesi Trotamundos
    Replies:
    6
    Views:
    303
  5. Jeremy Hutchings
    Replies:
    5
    Views:
    308
  6. mysorian
    Replies:
    1
    Views:
    307
  7. KLB3
    Replies:
    2
    Views:
    302
  8. Dinesh Pitale
    Replies:
    0
    Views:
    220
  9. kumaranil13k
    Replies:
    10
    Views:
    685
  10. dav thorne
    Replies:
    0
    Views:
    332

Share This Page

Loading...