title: How to change activity in android?
body: <p><br>
  I am making simple game. I have 3 activities. First activity is main menu (FirstActivity class).<br>
  First activity has following code:</p>
  
  <pre><code>Intent i = new Intent(this, SecondActivity.class);  
  startActivityForResult(i, ACTIVITY_CREATE);
  </code></pre>
  
  <p>It calls second activity where, second activity has following code:</p>
  
  <pre><code>setContentView(new MovementView(this));
  </code></pre>
  
  <p>MovementView class extends SurfaceView. MovementView class is where I write all game code.</p>
  
  <p>So I want to make when lives == 0, it changes to ThirdActivity. How do I do that?<br>
  I have tried putting code similar to FirstActivity's class but it doesn't seems to work.<br>
  If I put<br>
   <code>((Activity)getContext()).finish();</code><br>
  it just jumps back to FirstActivity, but that's not what I need, I need it to go to ThirdActivity class.</p>