title: Data lost due to orientation change when calling start activity for result
body: <p>If I can't make it clear please ask your query don't negative mark it. I'm new user</p>
  
  <p>I made a question answer app in which after answering all question it will go to finish page. Where thre are three buttons which will indicate whether you made right answer or wrong.<br>
  You can reanswer your question by clicking on the button 1,2 or 3 which will send the corresponding question no.</p>
  
  <p><strong>My problem.</strong></p>
  
  <p>I use  <code>startActivityForResult</code> function to go to the finish class from question class and return back with some data then <code>onActivityResult</code> function is called and run succesfuly.
  But if the orientation of the question class and finish class is not same then  after clicking the question button it does not call the <code>onActivityResult</code> function it restart the question class.</p>
  
  <p>This is the code for question class. Where I use <code>startactivityforresult</code>:</p>
  
  <pre><code> Intent intent=new Intent (question.this,finish.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);                                   intent.putExtra("question1",correct[1]);
    intent.putExtra("question2",correct[2])
    intent.putExtra("question3",correct[3]);
    startActivityForResult(intent, REQUEST);
  
  
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
       if (requestCode == REQUEST &amp;&amp; resultCode == Activity.RESULT_OK) {
            latitude = data.getIntExtra("latitude", 0)
           requstquestion(latitude);
  
       }}
  </code></pre>
  
  <p>This is the code for finish class:</p>
  
  <pre><code>      Intent mintent = getIntent();                 //recive the correct array
      accuracy[1] = mintent.getIntExtra("question1",0);
      accuracy[2] = mintent.getIntExtra("question2",0);
      accuracy[3] = mintent.getIntExtra("question3",0);
  
  
  
       question1.setOnClickListener(new View.OnClickListener() {
  
           public void onClick(View v) {
  
  
              setResult(Activity.RESULT_OK, 
                      new Intent().putExtra("latitude", 0));
                  finish();
  
                  // TODO Auto-generated method stub
                      }
                  });
      question2.setOnClickListener(new View.OnClickListener() {
  
           public void onClick(View v) {
  
  
              setResult(Activity.RESULT_OK, 
                      new Intent().putExtra("latitude", 1));
                  finish();
  
  
                  // TODO Auto-generated method stub
                      }
                  });
      question3.setOnClickListener(new View.OnClickListener() {
  
           public void onClick(View v) {
          setResult(Activity.RESULT_OK, 
                      new Intent().putExtra("latitude", 2));
                  finish();
  
                  // TODO Auto-generated method stub
                      }
                  });
  </code></pre>