DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(urlString);
nvps.add(new BasicNameValuePair("someParam", ParamValue));
httpPost.setHeader("User-Agent", "YOUR APP NAME OR WHATEVER
YOU WANT");
httpPost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
HttpResponse response = httpclient.execute(httpPost);
HttpEntity entity = response.getEntity();
if (entity != null)
{
try
{
is = entity.getContent();
String line;
StringBuilder builder = new StringBuilder();
BufferedReader reader = new BufferedReader(new
InputStreamReader(is), 8192);
while ((line = reader.readLine()) != null)
{
builder.append(line);
}
String retStr = builder.toString();
}
finally
{
entity.consumeContent();
is = null;
}
}
Sincerely,
Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com http://nocrappyapps.com
http://bistroblurb.com http://forcethetruth.com
http://ihottonight.com
-----------------------------------------------------------------------
Everything in moderation, including abstinence (paraphrased)
Every person is born with a brain... Those who use it well are the successful
happy ones - Brad Gies
Adversity can make or break you... It's your choice... Choose wisely - Brad Gies
Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead
On 18/11/2010 9:42 AM, jatl007 wrote:
Hi, Currently I'm developing a web based android application. I tried
many codes and non of them were succeed. Can any one post me a code
for download file to android phone.
thanx.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en