Although, what Google recommend use Camera2 Api >= 21, but you could have problem with manual settings.
When you need implement app for taking photo with Auto Setting Mode, it'll work fine.
But! If need create app with Manual Setting Mode implementation, for devices that have API >= 21, firstly, need check supported HARDWARE LEVEL:
Select camera(Front, Face), get it characteristics and check HARDWARE LEVEL.
mCameraCharacteristics = mCameraManager.getCameraCharacteristics(mCameraId)
val level = mCameraCharacteristics.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL)
CameraCharacteristics represent next supported levels:
LIMITED, FULL, LEGACY, LEVEL_3, EXTERNAL.
At a high level, the levels are:
LEGACY devices operate in a backwards-compatibility mode for older Android devices, and have very limited capabilities.
LIMITED devices represent the baseline feature set, and may also include additional capabilities that are subsets of FULL.
FULL devices additionally support per-frame manual control of sensor, flash, lens and post-processing settings, and image capture at a high rate.
LEVEL_3 devices additionally support YUV reprocessing and RAW image capture, along with additional output stream configurations.
If you got the LEGACY supprot level, you should use old Camera Api.