I have figured out how to pass this problem. I have a base activity class that every other activity in my application inherits from. I override
onResume with:
@Override
protected void onResume()
{
super.onResume();
setCanStartNewActivity(true);
}
and startActivityForResult with:
@Override
public void startActivityForResult(Intent intent, int requestCode)
{
//Does not allow starting a new activity unless previous activity returned
//This is a trick to stop multiple simultaneous button presses starting multiple
//activities simultaneously.
if(!canStartNewActivity)
return;
setCanStartNewActivity(false);
super.startActivityForResult(intent, requestCode);
}
This basically makes sure only one new activity can be started for a button press. If you let go of two buttons at the same time only the button released the earliest (even by 10 microseconds) will be fired and the other will still send the intent but it will not fire until the first fired activity returns or the app dies.