title: Send Json data from listview in one activity to another activity
body: <p>I am trying to send the json object data from one activity to other activity. I have a listview that is successfully populated from a json array, but as i click on a list item, it is not responding. No action is being performed on item click. I saw some tutorials but it did not helped. I need to send the list item's json data to another activity. Any help would be appreciated.</p>
  
  <p>Activity of listview populated with Json.</p>
  
  <pre><code>       try{
  
           jArray = new JSONArray(result);
           ListView listView=(ListView)findViewById(R.id.listtour_cat);
           listView.setAdapter(new ListViewAdapter(JSONUseActivity.this,jArray));
           listView.setOnItemClickListener(new OnItemClickListener() {
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
                      long arg3) {
                  // TODO Auto-generated method stub
                  try{
                      if(!jArray.isNull(arg2)){
                             Intent intent = new Intent(getApplicationContext(),TourDetailActivity.class);  
                             intent.putExtra("id", jArray.optJSONObject(arg2).getString("tour_id"));
                             startActivity(intent);    
                       }
  
                  }
                  catch(JSONException e){
                         Log.e("log_tag", "Error parsing data "+e.toString());
                 }
  
              }
          });
         }
         catch(JSONException e){
                 Log.e("log_tag", "Error parsing data "+e.toString());
         }
  
    }
          catch (Exception e) {
            Log.e("log_tag","Error in http connection!!" + e.toString());     
    }
  </code></pre>
  
  <p>Target Activity:</p>
  
  <pre><code>Intent intent = getIntent();
  String rcvid = intent.getStringExtra("id");
  Toast.makeText(getApplicationContext(), rcvid, Toast.LENGTH_LONG).show();
  </code></pre>