putExtra dont send the extras
<p>im trying to send some extras to the next activity, but it simply does not work and i dont understand why. im populating a map with overlays and when clicked i try to send the ID of the overlay item to a new activity but i get CursorIndexOutOfBounds.</p>

<pre><code>  public static String ROW_ID = "row_id"; // Intent extra key

 protected boolean onTap(int index) {
    // TODO Auto-generated method stub
    // return super.onTap(index);


    ROW_ID = overlayItemList.get(index).getTitle();

    Intent intent = new Intent(context, ViewContactFromMap.class);
    intent.putExtra("ROW_ID", overlayItemList.get(index).getTitle());

    Log.e("putExtra", "ROW_ID is " + ROW_ID);

    context.startActivity(intent);
    return true;
}
</code></pre>

<p>here Log.e will put out the id of the item i clicked. Example 29.</p>

<p>but in my next activity that i try to open the Log.e show the value 0 and thats why i get the CursorIndexOutOfBounds. but why isnt it picking up the value 29?</p>

<pre><code>        // get the selected contact's row ID
    Bundle extras = getIntent().getExtras();
    rowID = extras.getLong(MyOverlays.ROW_ID);

    Log.e("ViewContactFromMap", "rowID is: " + rowID);
</code></pre>

<p>Even if i hardcode and set the ROW_ID to 29, i still get the value of 0 in my next activity</p>

<hr>

<p>After the help i got from these people below, i got it to work with this:</p>

<pre><code>    ROW_ID = overlayItemList.get(index).getTitle();

    Intent intent = new Intent(context, ViewContactFromMap.class);
    intent.putExtra("ROW_ID", overlayItemList.get(index).getTitle());

    Log.e("putExtra", "ROW_ID is " + ROW_ID);

    context.startActivity(intent);
</code></pre>

<hr>

<pre><code>        // get the selected contact's row ID
    Bundle extras = getIntent().getExtras();
    rowIDs = extras.getString("ROW_ID");

    rowID = Long.parseLong(rowIDs); 
    Log.e("ViewContactFromMap", "rowID is: " + rowID);
</code></pre>
