title: Getting Index Position of ListView Clicked Item not getting String Value
body: <p>I am trying to pass value of <strong>KEY_TITLE</strong> from one activity to another activity, using click on List Item the particular row title which i have clicked, in my case i am trying to pass value of this: static final String KEY_TITLE = "title"; from <strong>OldEventActivity</strong> to <strong>OldUploadActivity</strong> but always i am getting "index position like: 0, 1", <em>not getting actual string</em> for <strong>KEY_TITLE</strong>.</p>
  
  <p><strong>OldEventActivity.java:</strong></p>
  
  <pre><code>        final ArrayList&lt;HashMap&lt;String, String&gt;&gt; itemsList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
          @Override
          protected ArrayList&lt;HashMap&lt;String, String&gt;&gt; doInBackground(
                  String... params) {
              HttpClient client = new DefaultHttpClient();
              // Perform a GET request for a JSON list
              HttpUriRequest request = new HttpGet(URL);
              // Get the response that sends back
              HttpResponse response = null;
              try {
                  response = client.execute(request);
              } catch (ClientProtocolException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              } catch (IOException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              }
              // Convert this response into a readable string
              String jsonString = null;
              try {
                  jsonString = StreamUtils.convertToString(response.getEntity()
                          .getContent());
              } catch (IllegalStateException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              } catch (IOException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              }
              // Create a JSON object that we can use from the String
              JSONObject json = null;
              try {
                  json = new JSONObject(jsonString);
              } catch (JSONException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              }
  
              try {
  
                  JSONArray jsonArray = json.getJSONArray(KEY_CATEGORY);
  
                  for (int i = 0; i &lt; jsonArray.length(); i++) {
  
                      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
                      JSONObject jsonObject = jsonArray.getJSONObject(i);
  
                      map.put("id", String.valueOf(i));
                      map.put(KEY_TITLE, jsonObject.getString(KEY_TITLE));
  
                      itemsList.add(map);
  
                  }
                  return itemsList;
              } catch (JSONException e) {
                  Log.e("log_tag", "Error parsing data " + e.toString());
              }
              return null;
          }
  
  
          @Override
          protected void onPostExecute(ArrayList&lt;HashMap&lt;String, String&gt;&gt; result) {
              list = (ListView) findViewById(R.id.listView1);
              adapter = new LazyAdapters(OldEventActivity.this, itemsList);
              list.setAdapter(adapter);
              // Show Item Title in Header
  
              this.progressDialog.dismiss();
              list.setOnItemClickListener(new OnItemClickListener() {
  
                  public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                          int position, long id) 
                  {       
                    Intent mViewCartIntent = new Intent(OldEventActivity.this, OldUploadActivity.class);
                    mViewCartIntent.putExtra("KEY", KEY_TITLE);
                    startActivity(mViewCartIntent);
  
                  }
              }); 
          }   
      }
  }
  </code></pre>
  
  <p><strong>OldUploadActivity.java:</strong></p>
  
  <pre><code>public class OldUploadActivity extends Activity  {
          public static final String LOG_TAG = "OldUploadActivity";
          private ListView lstView;
          private Handler handler = new Handler();;
          Bundle bundle;
          String keytitle;
          List &lt;String&gt; ImageList;
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);       
              setContentView(R.layout.activity_uploads);
              bundle = getIntent().getExtras();
              keytitle = bundle.getString("KEY");
              /*** Get Images from SDCard ***/
              ImageList = getSD();
              Log.d(OldUploadActivity.LOG_TAG, "getSD() :::--- " + ImageList);
  
              // ListView and imageAdapter
              lstView = (ListView) findViewById(R.id.listView1);
              lstView.setAdapter(new ImageAdapter(this));
          }
  
  
          private List &lt;String&gt; getSD()
          {
              List &lt;String&gt; it = new ArrayList &lt;String&gt;();            
              String string = "/mnt/sdcard/Pictures/PicsAngels/"; 
  
              File f = new File (string + keytitle + "/");
  
              Log.d(OldUploadActivity.LOG_TAG, "KEY_TITLE :::--- " + f);
              File[] files = f.listFiles ();
              Log.d(OldUploadActivity.LOG_TAG, "getListImages() :::--- " + files);
  
              for (int i = 0; i &lt;files.length; i++)           
              {
                  File  file = files[i];
                  Log.d(Upload.LOG_TAG, "i&lt;files.length() :::--- " + i);
                  Log.d("Count",file.getPath());
                  it.add (file.getPath());
              }
              Log.d(Upload.LOG_TAG, "List &lt;String&gt; it :::--- " + it);
              return it;
          }
  </code></pre>