So I am trying to launch a new activity after the item in a list is selected.... pretty basic based on what I've read. I am also trying to send a value in the extras. So I can select the item in a list, and the new activity starts, extras is set, but the value in the extras is empty. I've noticed the id of the intent on the new activity doesn't match the one from the 1st activity. I don't know if it is supposed to or not.
From Activity 1:
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Intent displayIntent = new Intent(getApplicationContext(), DisplayActivity.class);
int index = _names.indexOf(((TextView) view).getText());
displayIntent.putExtra("ID_TAG", ids.get(index));
startActivity(displayIntent);
}
In Activity2 (DisplayActivity)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras();
_hiveIndex = extras.getLong("ID_TAG");
}
Any Ideas why I wouldn't be getting the value? The mMap under the extras is set to a hash map before in the 1st intent, but is null in activity2.