Android Forums

Go Back   These FORUMS ARE DISABLED!! OUR NEW FORUMS ARE AT http://androidforum.com/ > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
 
 
LinkBack Thread Tools Display Modes
Old 11-28-2008, 03:00 AM   #1
Junior Member
 
Join Date: Nov 2008
Posts: 2
Friends: 0
View ritesh_tyfone's Profile   View ritesh_tyfone's Photo Album   View ritesh_tyfone's Blog   View Social Groups
Hi all, I am new to the Android, can anybody tell me how to make the Http connection to send the data to the server and recieving the response also? Or sample code for the same
ritesh_tyfone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 01-01-2009, 05:16 PM   #2
Junior Member
 
Join Date: Jan 2009
Location: Cardiff, Wales
Posts: 28
Friends: 0
View Emyr's Profile   View Emyr's Photo Album   View Emyr's Blog   View Social Groups
You need to use the java.net package:
http://code.google.com/android/refer...e-summary.html

Are you new to java?
Emyr is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 01-02-2009, 12:26 AM   #3
Junior Member
 
Join Date: Nov 2008
Posts: 2
Friends: 0
View ritesh_tyfone's Profile   View ritesh_tyfone's Photo Album   View ritesh_tyfone's Blog   View Social Groups
Thanx for your help. I am not new to the java but new to the android.
ritesh_tyfone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 01-18-2009, 08:33 AM   #4
Junior Member
 
Join Date: Jan 2009
Posts: 1
Friends: 0
View cybergen's Profile   View cybergen's Photo Album   View cybergen's Blog   View Social Groups
Very convenient classes for this task are also located in the org.apache.http package, especially org.apache.http.client.HttpClient. It works very fine in my applications...

try st. like this:
Code:
URI uri = new URI("http://your.server.com/yoursite.html");
HttpPost post = new HttpPost(uri);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(post);
You can use also HttpGet instead of HttpPost.
hope this helps...

Greets
cybergen
cybergen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection error? dtwalkerfl HTC Smart Mobility 8 12-02-2009 07:23 AM
How To share your G1 internet connection over USB BedHead Android Development, Answers, Tutorials, and Code Snippets 2 02-12-2009 04:36 PM
Lost internet connection! tipsy Android Hardware 1 11-11-2008 10:49 PM
Android To Ship With Apache HTTP Client 4.0 Alpha? Clinker Android Development, Answers, Tutorials, and Code Snippets 0 07-17-2008 10:34 AM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 05:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2012 TalkAndroid.com. All rights reserved.