Passing an ID over an intent
<p>I am trying to pass the ID of the clicked on data from my listview to a new activity in a second class i.e. I click the item on the <code>listview</code>.The <code>onListItemClick</code> method is called and  starts a new intent. The id is passed with the object in the <code>i.getExtra</code>. Then the id is stored into a new variable on the second class to be used later.</p>

<p>Ive got as far as working out how to pass the id, but I cant seem to work out how I then store it in the new variable on the second class.</p>

<p>Heres my code:</p>

<pre><code>public void onListItemClick(ListView list, View v, int list_posistion, long item_id)
{


    long id = item_id;
    Intent i = new Intent("com.example.sqliteexample.SQLView");
    i.putExtra(null, id);
    startActivity(i);
}
</code></pre>

<p>Could anyone tell me how to reference it in the second class? </p>
