react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

"Operation not permitted" error on Target SDK 30 android

Open SohelKabir opened this issue 3 years ago • 2 comments

Getting "Operaton not permited" error when calling this function ImageResizer.createResizedImage , Everythng works fine for android less than 11 but not working on android 11 after setting target SDK 30. Which is mandatory now for play store publication. code blocks given below

try {
      const res = await ImageResizer.createResizedImage(
        img,
        600,
        600,
        imgFormat,
        70,
        0,
        `${imageFolderName}/`,
      );
      if (res) {
        try {
          const newImgFile = `${imageFolderName}/${uid}.${imgFormat}`;
          await RNFS.moveFile(res.uri, newImgFile);
          return newImgFile;
        } catch (e) {
          log('fsUtil', e);
        }
        return null;
      }
    } catch (err) {
      log('ImagePicker', err);
    }

SohelKabir avatar Nov 07 '21 12:11 SohelKabir

Hey @SohelKabir

Our app is being rejected by the Play store because of the new policy on using MediaStore API. Did you find any issue with this particular module while submitting the app?

joy-betterhalf avatar Dec 28 '21 08:12 joy-betterhalf

getting same error with sdk level 31

mdtechcs avatar Mar 12 '22 08:03 mdtechcs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 01 '22 18:09 stale[bot]

This issue has been automatically closed. Thank you for your contributions.

stale[bot] avatar Sep 08 '22 18:09 stale[bot]