title: How to get value onListItemClick and pass it to another activity
body: <p>I have a listView which has information inside and when i click one row it must give me all the details under that selected row , in that select row i have image, imagename, price, etc.
  so when I click image in listView it must populate all the information including the image on a next activity</p>
  
  <p>I have tried to display on my listView and it ok,here my code :</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          JSONObject json = JSONfunctions.getJSONfromURL("http://10.0.2.2/php/p.php");
  
              try{
  
                  JSONArray  earthquakes = json.getJSONArray("prop");
  
                  for(int i=0;i&lt;earthquakes.length();i++){                        
  
                      JSONObject e = earthquakes.getJSONObject(i);
  
                      String BookName = e.getString("P_City");
                      PNames.add(BookName);
                      String BookImg = e.getString("Pname");
                      PImages.add(BookImg);
                  }       
              }catch(JSONException e){
                   Log.e("log_tag", "Error parsing data "+e.toString());
              }   
  
  
          setListAdapter(new MobileArrayAdapter(this, PNames,PImages));
  
  
      }
  
      @Override
      protected void onListItemClick(ListView l, View v, int position, long id) {
  
          String selectedValue = (String) getListAdapter().getItem(position);
          Toast.makeText(this, selectedValue, Toast.LENGTH_SHORT).show();
  
  
           Intent i = new Intent(getApplicationContext(), Searching.class);
           // sending data to new activity
           i.putExtra("product", selectedValue);
           startActivity(i);
  
  
      }
    }
  </code></pre>
  
  <p>EDIT  :</p>
  
  <pre><code>private final Context context;
      private final String[] myBookNamelist = null;
      private ArrayList&lt;String&gt; MyP = new ArrayList&lt;String&gt;();
      private ArrayList&lt;String&gt; myPurl = new ArrayList&lt;String&gt;();
       //ArrayList&lt;HashMap&lt;String, String&gt;&gt; myBookNamelist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
       //ArrayList&lt;HashMap&lt;String, String&gt;&gt; myBookImageurl = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
      public MobileArrayAdapter(Context context,ArrayList&lt;String&gt; Bname,ArrayList&lt;String&gt; BUrl) {
          super(context, R.layout.list_mobile, Bname);
          this.context = context;
          this.MyP = Bname;
          this.myPurl = BUrl;
      }
  
  
      public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater inflater = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View rowView = inflater.inflate(R.layout.list_mobile, parent, false);
          TextView textView = (TextView) rowView.findViewById(R.id.label);
          ImageView imageView = (ImageView) rowView.findViewById(R.id.logo);
          textView.setText(MyP.get(position));
          Bitmap bitmap = null;
          // Change icon based on name
          JSONObject json = JSONfunctions.getJSONfromURL("http://10.0.2.2/php/p.php");
             // http://api.geonames.org/earthquakesJSON?north=44.1&amp;south=-9.9&amp;east=-22.4&amp;west=55.2&amp;username=demo  
              try{
  
                  JSONArray  earthquakes = json.getJSONArray("prop");
  
                  //for(position=0;position&lt;earthquakes.length();position++){
                      JSONObject e = earthquakes.getJSONObject(position);
                      String BB = e.getString("P_City");
                      MyP.add(BB);
  
                      String UU = e.getString("Pname");
                      myPurl.add(UU);
  
                  //}
  
              }catch(JSONException e){
                   Log.e("log_tag", "Error parsing data "+e.toString());
              }
  
  
              String s = MyP.get(position);
              String i = myPurl.get(position);
  
              System.out.println(s);
              System.out.println(i);
  
  
              try {
                  bitmap = BitmapFactory.decodeStream((InputStream)new URL(i).getContent());
              } catch (MalformedURLException err) {
                  // TODO Auto-generated catch block
                  err.printStackTrace();
              } catch (IOException err) {
                  // TODO Auto-generated catch block
                  err.printStackTrace();
              }
  
              //if (!s.equals("")) {
                  imageView.setImageBitmap(bitmap);
              //} else {
              System.out.println("Bitmap image: "+position+"="+bitmap);
                  //imageView.setImageResource(R.drawable.android_logo);
              //}
  
  
          return rowView;
      }
  }
  </code></pre>
  
  <p>And I can pass position to the next class , but how to get all the information from a selected row ?</p>