Home > database >  How start android default camera without showing chooser using react-native-image-crop-picker
How start android default camera without showing chooser using react-native-image-crop-picker

Time:07-20

i am using react-native-image-crop-picker library as camera but when i open camera getting chooser option to select any one camera app i want to directly open default camera without showing chooser options from react native

CodePudding user response:

You can use this:

ImagePicker.openCamera({
  width: 300,
  height: 400,
  cropping: true,
}).then(image => {
 console.log(image);
});

CodePudding user response:

You can directly invoke the function provided by react-native-image-crop it is called openCamera for camera opening you can use it as the following

ImagePicker.openCamera({
 ...your camera config
}).then(image => {
  console.log(image);
});
  • Related