title: Prevent activity from being destroyed
body: <p>I'm sending an intent to the camera from an activity that I call like this:</p>
  
  <pre><code> Intent testphoto = new Intent(Dashboard.this,CameraHandler.class);
   startActivity(testphoto);
  </code></pre>
  
  <p>In the <code>CameraHandler</code> class I call the camera:</p>
  
  <pre><code>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); 
  startActivityForResult(intent, 0);
  </code></pre>
  
  <p>But before <code>onActivityResult</code> gets called in the <code>CameraHandler</code> class the activity is destroyed. Is there anyway to prevent this?</p>
  
  <p>FOUND THE ANSWER:
  I had <code>noHistory="true"</code> in my <code>AndroidManifest</code> and that made the OS destroy the activity before the result.</p>