String line = null; try { DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost("Valid url"); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); line = EntityUtils.toString(httpEntity); Displaymsg(line); } catch(Exception ex) { Displaymsg(ex.getMessage()); }
try { HttpClient httpclient = new DefaultHttpClient(); HttpPost post = new HttpPost("Valid url"); HttpResponse response = httpclient.execute(post); HttpEntity entity = response.getEntity(); Returned = EntityUtils.toString(entity); Toast.makeText(this, Returned, Toast.LENGTH_LONG).show(); } catch ( IOException ioe ) { ioe.printStackTrace(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)