I\'m trying to open a frontal camera on my device but nothing that I try works and the back camera is always opening. I\'m using the LG G4 device.
File file;
You are assuming that an undocumented, unsupported Intent
extra will be honored by all camera apps on all devices.
There are ~2 billion Android devices, made up of thousands of device models. Those device models will ship with hundreds of different camera apps. Users can also install camera apps themselves. Any of those hundreds of camera apps may be what handles your ACTION_IMAGE_CAPTURE
request. And none of them have to honor an android.intent.extras.CAMERA_FACING
extra.
You are welcome to put that extra on the Intent
, and it is possible that there are camera apps that will pay attention to it. You should not assume that any camera will pay attention to it, and it will be up to the user to choose what camera to use for taking the picture.