I followed the sample code on their developer page, and I'm not sure how to add the pro mode camera feature into my app after initializing the Huawei Camera Kit instance.
private CameraKit mCameraKit;
mCameraKit = CameraKit.getInstance(getApplicationContext());
//If the current mobile phone does not support the kit or the SDK version is incompatible, NULL is returned. Compatibility processing is required.
if (mCameraKit == null) {
return;
}
Based on the Huawei Developer guides section, pro mode should be one of the supported camera modes, but I did not find pro mode in the Camera Kit API reference. Does anyone know how to enable pro mode?
There is no specific mode definition for Pro mode. Pro mode is defined by the open keys. You only need to:
Set mCurrentModeType to PRO_PHOTO_MODE or PRO_VIDEO_MODE.
Use mCurrentModeType to create a Mode object.
Call the setParameter method of the Mode object to enable the corresponding capability.
Use the takePicture, startRecording, and stopRecording methods of the Mode object to take photos and record videos. Refer to details.
After the preview function is enabled, you can configure the capability values of Pro mode, such as the ISO, exposure time, and white balance. Below are some sample code.
// Query the functions supported by the mode.
List<CaptureRequest.Key<?>> parameters = mModeCharacteristics.getSupportedParameters();
// Query the supported ISO range.
List<Integer> values = mModeCharacteristics.getParameterRange(RequestKey.HW_PRO_SENSOR_ISO_VALUE);
// Set the ISO value. The first value is used as an example.
mMode.setParameter(RequestKey.HW_ PRO_SENSOR_ISO_VALUE, values.get(0));