I’m trying to launch an intent from an activity class:
Intent i = new Intent(this, (Obscured)MapActivity.class);
i.putExtra("stop", stop);
this.startActivity(i);
And here is my intent receiver in (Obscured)MapActivity:
Intent i = this.getIntent();
if (i != null && i.getSerializableExtra("stop") != null) {
this.displayLocations();
BusStop tempStop = new BusStop();
tempStop = (BusStop) i.getSerializableExtra("stop");
this.goToStop(tempStop);
}
But for some reason it isn’t launching. I have another case right above that:
if (i != null && i.getSerializableExtra("loc") != null) {
this.displayLocations();
this.goToLocation((Location) i.getSerializableExtra("loc"));
}
That works just fine, and the intent launcher code is almost completely identical. Any ideas?
EDIT: I’m also using SherlockListActivity, not sure if that changes anything.
<activity
android:name=".(Obscured)MapActivity"
android:configChanges="keyboardHidden|orientation|screenSize|uiMode|screenLayout"
I’m happy to provide more info, this has been bugging me for a few hours now.
ANSWER:
Found the issue. For some reason when I add the extras (stop) which is serializable, it breaks. Commenting out the putExtra() and it works. The problem was trying to serialize a GeoPoint.
Found the issue. For some reason when I add the extras (stop) which is serializable, it breaks. Commenting out the setExtra() and it works. Not sure why it won’t pass it though, the class extends serializable but everything I try just makes it break again.