code: public static void launchCameraIntent(final Activity context, final Uri outputDestination, final int requestCode){
          final Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          intent.putExtra(MediaStore.EXTRA_OUTPUT, outputDestination);
          if (intent.resolveActivity(context.getPackageManager()) != null) {
              grantUriPermissionsForIntent(context, outputDestination, intent);
              context.startActivityForResult(intent, requestCode);
          }
      }
docs: Launch camera on the device using android's ACTION_IMAGE_CAPTURE intent.
  @param outputDestination Save image to this location.