0

i am working on a project i need to use the camera i generate react native version 66.1 and i installed the latest version of react-native-image-piker 4.1.2

no permission needed

and this is the simple code

    try {
      launchCamera({quality: 1}, img =>
        this.setState({
          img: {...img?.assets[0], name: img?.assets[0]?.fileName},
        }),
      );
    } catch (e) {
      console.log(e);
    }

but always my app is restarted

i found some solution like adding android:largeHeap="true" in the manifest but ntg work and i also tested the library in empty project it's working fine

i've worked with with android 11 and 7 and the same problem in both

DiveDive
  • 88
  • 5
  • By any chance, did you find a solution to your issue? I am facing it as well – Gigalink Apr 23 '22 at 11:40
  • @Gigalink well the. problem was another developer added a listener to the app i mean background or foreground in app.js so and excute a function there so it caused me that error – DiveDive May 10 '22 at 09:36
  • Very interesting @DiveDive, I do have such background/foreground listeners elsewhere, although I am unable to replicate the issue on my end I will investigate further on that case. Thank you! :) – Gigalink May 11 '22 at 10:10

0 Answers0