title: Keep Activity "alive" when calling "StartActivityForResult"
body: <p>I have been trying everything to start an Activity for Result but keeping the caller activity seems impossible.</p>
  
  <p>I Have tried setting on the caller activity in the manifest "android:onConfigChanges" for screenSize, orientation and keyboardHidden.</p>
  
  <p>It is very important because in the caller Activity an Asyn Task loads the content from a Web Service.</p>
  
  <p>When the Activity gets resumed after taking the picture, the Caller activity gets destroyed and loads again the entire UI from the Web Service and destroy the user imputs. Is there a way to prevent this?</p>
  
  <p>This is the Caller method for the camera intent.</p>
  
  <pre><code>private void openCamera(){
          Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          // Ensure that there's a camera activity to handle the intent
          if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
              //takePictureIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); &lt;- Commented and not commented with the same problem.
              // Create the File where the photo should go
              try {
                  photoFile = createImageFile();
              } catch (IOException ex) {
                  ex.printStackTrace();
              }
              // Continue only if the File was successfully created
              if (photoFile != null) {
                  takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,
                          Uri.fromFile(photoFile));
                  startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
              }
          }
      }
  </code></pre>
  
  <p>An this is the "createImageFile()":</p>
  
  <pre><code>private File createImageFile() throws IOException {
      // Create an image file name
      File file;
      String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
      String imageFileName = timeStamp + "_";
      File storageDir = new File(Environment.getExternalStoragePublicDirectory(
              Environment.DIRECTORY_PICTURES), "myAppDirectory");
      if (!storageDir.mkdir()){
          storageDir.mkdirs();
      };
  
      file = File.createTempFile(
              imageFileName,  /* prefix */
              ".jpg",         /* suffix */
              storageDir      /* directory */
      );
  
      mCurrentPhotoPath = file.getAbsolutePath();
      return file;
  }
  </code></pre>