Android: Problem exiting app
<p>I'm putting a EULA into my app. It pops up when the user first enters, and doesn't go away until the user presses the "I agree" button. All of that works fine. The problem is when the user doesn't push the button. I'd like my app to terminate if the user presses the home button instead of agreeing to the terms, but right now, the home button doesn't work. The app closes briefly, but then opens up again to the EULA page - Basically, once the user opens the app, they cannot use their phone until they agree to the EULA's terms. </p>

<p>Does anybody know what's wrong, or have any ideas about how to fix it?</p>

<p>Thanks</p>

<p>EDIT (here's the code for my EULA class)</p>

<pre><code>public class EULAActivity extends Activity implements OnClickListener{

@Override public void onCreate(Bundle savedInstanceState) 
{
    GameEngine.pause();
    super.onCreate(savedInstanceState);

    //No Title bar
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    //Set the view
    setContentView(R.layout.eula_layout);

    //Assign onClickListener to button
    Button button = (Button)findViewById(R.id.eula_button);
    button.setOnClickListener(this);
}

@Override
public void onClick(View v) 
{
    MainActivity.firstRun = false;
    GameEngine.unPause();
    this.finish();
}
</code></pre>
