I tried other questions' methods, but for me, these methods do not work .
I want to use intent to start front camera. I try to do it
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("android.intent.extras.CAMERA_FACING", android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT);
intent.putExtra("android.intent.extras.LENS_FACING_FRONT", 1);
intent.putExtra("android.intent.extra.USE_FRONT_CAMERA", true);
mFile = Utils.getVisitorImage();
Uri imageUri = FileProvider.getUriForFile(
getActivity(),
getActivity().getPackageName() + ".fileprovider",
mFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
startActivityForResult(intent, CAMERA_PHOTO_REQUEST_CODE);
but,it does't work. my device is Android 7.1.1. How to use intent start front camera? I hope someone help me.Thanks.