title: onActivityResult is not been invoked after the child activity calls finish()
body: <p>Though there are several questions regarding this topic, I could not find a right answer to this.</p>
  
  <p>I have a main activity (This is one activity in a tabview) from where I am calling the login activity.</p>
  
  <pre><code>    Button chdbtn=(Button)findViewById(R.id.Add);
      chdbtn.setOnClickListener(new OnClickListener() {   
          @Override
          public void onClick(View v) {
          Intent myIntent = new Intent(main.this, Login.class);
              startActivityForResult(myIntent, 1001);
      }
      }); 
  
  
  protected void onActivityResult(int requestCode, int resultCode, Intent data){
          if(requestCode == 1001)
          {
              if(resultCode == RESULT_OK)
              {
                            Log.i("Info","Inside");
              }
          }
  }
  </code></pre>
  
  <p>And in my login class, When I click on a button, I am doing this</p>
  
  <pre><code>    Button chdbtn=(Button)findViewById(R.id.Addchild); 
      chdbtn.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
                  Intent Ireturn = new Intent();
                  setResult(RESULT_OK,Ireturn);
                  finish();
          }
      });
  </code></pre>
  
  <p>But when I click on the button in login activity, the control is not coming to the main activities onActivityResult method. Can anyone guide me what is the issue.</p>
  
  <hr>
  
  <p>VIJAYapp.sample.ChildEntry1$1/onClick:23</p>
  
  <p>INFO/ActivityManager(59): Starting activity: Intent { cmp=app.sample/.ChildLogin }</p>
  
  <p>WARN/ActivityManager(59): startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=app.sample/.ChildLogin }</p>
  
  <p>DEBUG/PhoneWindow(999): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@43e4b620 has no id.</p>
  
  <p>INFO/ActivityManager(59): Displayed activity app.sample/.ChildLogin: 460 ms (total 460 ms)</p>
  
  <p>INFO/VIJAY(999): VIJAYapp.sample.ChildLogin$1/onClick:24</p>
  
  <hr>
  
  <p>Above is the log that I am getting when clicking on the buttons. I can see that there is some problem with the Activity..any answers?</p>