Search code examples
react-nativereact-native-image-picker

react-native-image-picker reloading the whole app on capturing image


When capturing the photo using react-native-image-picker and saving it, the whole app is being reloaded sometimes. This is not happening all the time, sometimes it is working as expected, but sometimes its reloading the app.

ImagePicker.launchCamera(options, (response) => {
  this.setState({ fileUri: response.uri, fileName: response.fileName })
});

"react-native": "0.59.1", "react-native-image-picker": "^0.26.10",


Solution

  • I was able to fix it by adding android:requestLegacyExternalStorage="true" to application tag in AndroidManifest.xml file