title: cant back to OnActivityResult
body: <p>hey guys i wanted to back to onActivityResult in previous activity</p>
  
  <p>here is my code </p>
  
  <pre><code>public void onClick(DialogInterface dialog, int id) {
                              Intent i = new Intent(DetailPhotoMedical.this, MedicalClaim.class);
                              Bundle extras = new Bundle();
                             // i.putExtra("photo", "");
                              extras.putString("photo","");
                              extras.putString("photoNo",photoNo);
                              i.putExtras(extras);
                              setResult(1000, i);
                              finish();
                          }
  </code></pre>
  
  <p>and i want to back to previous activity in onActivityResult</p>
  
  <pre><code> protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      if(resultCode==1000)
      {
          Intent ii = getIntent();
          Bundle extras = ii.getExtras();
          photoFromDetail = extras.getString("photo");
          photoNo = extras.getString("photoNo");
          if (photoNo=="photo1")
          {
              strPhoto1="";
              ivAttachment1.setImageResource(R.drawable.ic_menu_camera);
          }
  
      }
  </code></pre>
  
  <p>here is code to intent the 2nd acitvity</p>
  
  <pre><code>Intent i = new Intent(MedicalClaim.this, DetailPhotoMedical.class);
  
                 /* i.putExtra("photo", strPhoto1);*/
                  Bundle extras = new Bundle();
                  extras.putString("photo", strPhoto1);
                  extras.putString("photoNo","photo1");
                  i.putExtras(extras);
                  i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                  startActivity(i);
  </code></pre>
  
  <p>but the OnActivityResult didnt catch my resultcode</p>
  
  <p>can you tell me whereis the wrong?</p>
  
  <p>thx</p>