title: How can I end an activity from inside a SurfaceView class or nested thread
body: <p>I’m writing an application (game) where I would like to end the game activity when the user fails the game.  My game is loosely based off lunarlander, so I figure it may be easier to ask for help using lunarlander as an example, since a lot of folks are familiar with it.</p>
  
  <p>When the user fails the lunarlander game, I want to automatically end the activity (because my app uses more than one activity).  I know that I can use the finish() method inside the activity class, but I can’t use that method inside the surfaceview class or its nested thread.  What can I do from inside this class that can be used to end the activity or create a trigger back to the activity class?</p>
  
  <p>Or, is there an entirely different way I should approach this?</p>
  
  <p>Thanks.</p>