HttpResponse to String android

HttpClient httpclient; HttpPost httppost; HttpResponse response; httppost = new HttpPost(“website-url-goes-here”); try { response = httpclient.execute(httppost); HttpEntity entity1 = response.getEntity(); InputStream is = entity1.getContent(); String w1url = convertStreamToString(is); } catch (ClientProtocolException e1) { // TODO Auto-generated catch…

Read More

Alert Box in Android

protected void alertbox(String title, String mymessage) { new AlertDialog.Builder(this) .setMessage(mymessage) .setTitle(title) .setCancelable(true) .setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton){} }) .show(); } For more details see below link… http://huuah.com/dialog-boxes-in-android/

Read More