Quit application button android
<p>I would like to create a button in my game for the user. The button will quit the application. </p>

<p>Please can someone tell me if there is a way to do this. </p>

<p>Thanks. </p>

<p>Edit:
I have an activity which uses another activity with a class that extends Android.app.Application using set and get methods. </p>

<p>Simply using the back button switches the activities until it goes to the beginning. </p>

<p>I go in between these classes 20 times. </p>

<p>Thats why I needed a back button. But I guess there isn't so I will have to do it the long way and set everything back to the first state on quit. Thanks</p>
