I am making a android game and at the moment i am working on a simple menu, this menu has 2 buttons one that generates a random map and lets you play it and one that takes you to a list of pre made levels. The problem is that if i press the random map button and run the game activity if i press the back button to return to the menu activity and try to play a random game again it crashes
The following is the function that gets called when you press the random map button
public void playRandom( View view )
{
Intent intent = new Intent(this, CUBEGameActivity.class);
intent.putExtra(EXTRA_MESSAGE, "RANDOM");
startActivity(intent);
}
how can i stop this, any help would be great
Cheers Daniel