Open swaroopa94 opened 5 years ago
I have the same problem. I hope I can get help.
This behavior relies on default camera application installed on device. Usually it installed by manufacturer. Some manufacturers doesn't properly handle camera facing parameter as it is not currently standardized on android.
As I see the only way to properly handle useFrontCamera
parameter is to change plugin's approach to capture images by implementing camera functionality by it's own.
Anyway would be great to mention this unreliable behavior in docs.
Duplicate of #1029
Make sure you added the following permissions for front camera in app/src/main/AndroidManifest.xml
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
I did not add the useFrontCamera prop. Front camera is working automatically and running perfectly.
some android mobile can not open front camera
@ivpusic @andrey-tsaplin any update on this? i just want to open back camera by default. but even setting useFrontCamera to false did not work for me. if we have opened selfie camera in main camera it will open selfie first.
Do you remove this option "cropping:true", but the camera not has function of the crop
i just want to open back camera by default. but even setting useFrontCamera to false did not work for me. if we have opened selfie camera in main camera it will open selfie first.
Version
Tell us which versions you are using:
Platform
Expected behaviour
when using useFrontCamera = true then when we use openCamera method then the front camera should be by default
Actual behaviour
But when we use that useFrontcamera=true in android the default camera is opening instead of front camera
Steps to reproduce
install the module and link
use openCamera method and give useFrontCamera property as true
then in android when we run we can see the default back camera is opening
Attachments
`ImagePicker.openCamera({ mediaType: "video", useFrontCamera: true }) .then(image => { console.log("received image", image);
Please anyone help me n solving this..
Thanks