private void startCameraIntent(final Activity activity, final Fragment fragment, String subFolder,
                                   final String action, final int requestCode) {
        final String cameraOutDir = BoxingFileHelper.getExternalDCIM(subFolder);
        try {
            if (BoxingFileHelper.createFile(cameraOutDir)) {
                mOutputFile = new File(cameraOutDir, System.currentTimeMillis() + ".jpg");
                mSourceFilePath = mOutputFile.getPath();
                Intent intent = new Intent(action);
                Uri uri = getFileUri(activity.getApplicationContext(), mOutputFile);
                intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
                try {
                    startActivityForResult(activity, fragment, intent, requestCode);
                } catch (ActivityNotFoundException ignore) {
                    callbackError();
                }

            }
        } catch (ExecutionException | InterruptedException e) {
            BoxingLog.d("create file" + cameraOutDir + " error.");
        }

    }
start system camera to take a picture

@param activity      not null if fragment is null.
@param fragment      not null if activity is null.
@param subFolderPath a folder in external DCIM,must start with "/".
boxing/src/main/java/com/bilibili/boxing/utils/CameraPickerHelper.java