How to transition between Activity classes in Android?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5498905/how-to-save-user-state-in-android">How to save user state in Android?</a>  </p>
</blockquote>



<p>My application's first activity is login1 in which i am asking user to enter password,confirm password,security question and answer(security question and answer is taken in case of retrive password to user in the form of sms or email.)</p>

<p>second activity is login2  having only one field to enter that is password.</p>

<p>third activity is main activity of my application that is setting.</p>

<p>Now the question is that when user enters information of all fields which are in first activity login1 then he should move to directly to setting activity.</p>

<p>if  user close application after setting password and  open it again he must get second activity that is login2 where he just have to enter password to login.</p>

<p>if he remove that application from phone and then install again he must get first activity that is login1  .</p>

<p>So tell me code for doing it .please replay.</p>
