title: how to get startactivityforresult get result from 4th activity
body: <p>I have <code>MainActivity</code> from that <code>startActivityForResult()</code> for 2nd <code>activtiy</code> but i want result from 4th <code>activity</code> what should i do for that?</p>
  
  <blockquote>
    <p>MainActivity </p>
    
    <p>FirstActivity </p>
    
    <p>secondActivity</p>
    
    <p>ThirdActivity</p>
    
    <p>FourActivity</p>
  </blockquote>
  
  <p>from this i want result from 4th activity, but from secondactivity to fourth actity are dependent activities</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>public static String MY_RESULT=1000;
  
       intent=new Intent(MainActivity.this,FirstActivity.class);
                      startActivityForResult(intent,MY_RESULT);
  
  
  
  
  
   @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          if (resultCode == RESULT_OK) {
  
              switch (requestCode) {
                  case MY_RESULT:
                      String info = data.getExtras().getString("KEY");
  
  
                      if(!info.equals("")) {
                          Log.i("TAAAG", info);
  
                      }
  
                      break;
  }
  }
  }
  </code></pre>
  
  <p><strong>FirstActivity.java</strong></p>
  
  <pre><code>Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
                      startActivity(intent);
  finish();
  </code></pre>
  
  <p><strong>SecondActivity.java</strong></p>
  
  <pre><code>Intent intent = new Intent(SecondActivity.this, ThirdActivity.class);
                      startActivity(intent);
  finish();
  </code></pre>
  
  <p><strong>ThirdActivity.java</strong></p>
  
  <pre><code> Intent intent = new Intent(ThirdActivity.this, FourActivity.class);
                          startActivity(intent);
  finish();
  </code></pre>
  
  <p><strong>FourActivity.java</strong></p>
  
  <pre><code>  Intent intent = new Intent();
  
  
           intent.putExtra("KEY", "my data in string");
  
                          setResult(RESULT_OK, intent);
  
  
        finish();
  </code></pre>
  
  <p>here in <code>MainActivity.java</code> Im not able to get any result.And I want result from <code>FourActivity.java</code>.Please help</p>