code: public static Intent getCameraCaptureIntent(Context ctx, String authority){
          Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          try {
              // Get the app's local file storage
              mCurrentCaptureUri = createAccessibleTempFile(ctx, authority);
              grantPermissions(ctx, mCurrentCaptureUri);
              intent.putExtra(MediaStore.EXTRA_OUTPUT, mCurrentCaptureUri);
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          return intent;
      }
docs: Generate the appropriate intent to launch the existing camera application
  to capture an image
  
  
  @see #CAPTURE_PHOTO_REQUEST_CODE
  @return          the intent necessary to launch the camera to capture a photo