title: Delay going back to Main Activity
body: <p>In Main Activity I call the native Camera app. That is good. However after a shutter click the camera returns to the Main Activity. This would have been good if they picture was taken correctly. It looks like the Camera needs some time to save the picture and leaving the Camera app causes the picture to be dismissed.</p>
  
  <p>Not sure what I need to do for the Camera to have enough time to save pictures!</p>
  
  <pre><code>   /** Check if this device has a camera */
  private boolean checkCameraHardware(Context context) {
      if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){
          // this device has a camera
          return true;
      } else {
          // no camera on this device
          return false;
      }
  }
  
  
  public void openCamera(View view) {
      Log.i("Camera", "Inside openCamera");
      if ( checkCameraHardware(getApplicationContext())) {
          if ( Build.VERSION.SDK_INT &gt;= 23) {
              if (ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA)
                      != PackageManager.PERMISSION_DENIED) {
                  Intent intentCamera = new Intent("android.media.action.IMAGE_CAPTURE");
                  startActivity(intentCamera);
              } else {
                  Log.i("Camera", "Camera not permitted");
                  ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, 0);
              }
          } else {
              Intent intentCamera = new Intent("android.media.action.IMAGE_CAPTURE");
              startActivity(intentCamera);
          }
      }
  }
  </code></pre>