title: Getting intent result from ondestroy
body: <p>I can get the result from intent using <code>onBackpressed</code> :</p>
  
  <pre><code>returnIntent.putExtra("isBack", true);
  setResult(RESULT_OK,returnIntent);     
  finish();
  </code></pre>
  
  <p>And this is my <code>onActivityResult</code> :</p>
  
  <pre><code>if (requestCode == 1) 
          {
               if(resultCode == RESULT_OK){      
                   boolean isBack = data.getBooleanExtra("isBack", false);
                   if(isBack == true)
                       searchEditText.setText("");
               }
           }
  </code></pre>
  
  <p>However, now i need to do the <code>setResult</code> <strong>not</strong> in the <code>onBackpressed</code>, so i was thinking of <code>onDestroy</code>.</p>
  
  <p>I tried to move the <code>setResult</code> to <code>onDestroy</code> but the <code>onActivityResult</code> cant get my result.</p>
  
  <p>I also have tried <code>onStop</code> and <code>onPause</code>, but none of them are working.</p>
  
  <p>Please help me, Thanks for your help </p>