ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.09k stars 1.55k forks source link

ImagePicker.openCamera throwing missing permissions error for TargetVersion 33 #1962

Open PrasadFeker opened 1 year ago

PrasadFeker commented 1 year ago

Your Environment


imageCaptureHandler = () => {
    ImagePicker.openCamera({ mediaType: 'photo', compressImageQuality: 0.6 })
      .then((image) => {
        console.log('Called==>', 'call');

        let files = [
          { uri: image.path, name: 'invoice0.jpg', type: image.mime },
        ];
        this.setState({
          isUploadInvoiceModal: false,
          isSendInvoiceFiles: true,
        });
        this.sendInvoiceNumber(files);
      })
      .catch((e) => {
        console.log('Errr', e);
        if (e.code !== 'E_PICKER_CANCELLED') {
          DropDownHolder.dropDown.alertWithType(
            'error',
            '',
            I18n.t('Please_try_again')
          );
        } else {
          console.log('user cancelled or something went worng');
        }
      });
  };

Expected Behavior

User can be open the camera and capture the image

Actual Behavior

when i try to open the camera can be open the camera and capture the image, ImagePicker.openCamera throws the error like missing android permission

Attachments

Screenshot 2023-08-28 at 12 58 07 PM Screenshot 2023-08-28 at 1 16 57 PM
omonk commented 1 year ago

https://github.com/ivpusic/react-native-image-crop-picker/issues/1849