Making Android/Java code more efficient - removing duplicate
===

I have a standard AsyncTask like this:


    // starting AsyncTask in onCreate	
    new taskName().execute();


	class TaskName extends AsyncTask<String, String, Void> {
		private ProgressDialog progressDialog = new ProgressDialog(Items.this);
		private InputStream is = null;
		private String result = "";

		protected void onPreExecute() {
			progressDialog.setMessage("Loading...");
			progressDialog.show();

			progressDialog.setOnCancelListener(new OnCancelListener() {

				public void onCancel(DialogInterface dialog) {
					TaskName.this.cancel(true);

				}
			});
		}

		@Override
		protected Void doInBackground(String... params) {
			String url_select = "my_link.php";

			param = new ArrayList<NameValuePair>();
			param.add(new BasicNameValuePair("Category", Category));

			HttpClient httpClient = new DefaultHttpClient();
			HttpPost httpPost = new HttpPost(url_select);

			try {
				httpPost.setEntity(new UrlEncodedFormEntity(param));

				HttpResponse httpResponse = httpClient.execute(httpPost);
				HttpEntity httpEntity = httpResponse.getEntity();

				// read content
				is = httpEntity.getContent();

			} catch (Exception e) {

				Log.e("log_tag", "Error in http connection " + e.toString());
			}
			try {
				BufferedReader br = new BufferedReader(
						new InputStreamReader(is));
				StringBuilder sb = new StringBuilder();
				String line = "";
				while ((line = br.readLine()) != null) {
					sb.append(line + "\n");
				}
				is.close();
				result = sb.toString();

			} catch (Exception e) {
				// TODO: handle exception
				Log.e("log_tag", "Error converting result " + e.toString());
			}

			return null;

		}

		protected void onPostExecute(Void v) {

			try {

				JSONArray jArray = new JSONArray(result);
				JSONObject json_data = null;
				for (int i = 0; i < jArray.length(); i++) {
					json_data = jArray.getJSONObject(i);
					item = json_data.getString("item");

					items.add(item);

				}
			} catch (JSONException e1) {
				Toast.makeText(getBaseContext(), "No items!",
						Toast.LENGTH_SHORT).show();
			} catch (ParseException e1) {
				e1.printStackTrace();
			}

			progressDialog.dismiss();

		}
	}


However, I find myself having three near identical AsyncTasks doing this same thing.  Accessing a PHP file, parsing JSON & printing JSON.

I search for a while to see if there is a standard class out there I can use but I could not find any.  Is there a way to make this more efficient so I am not repeating so many times?