ImagePicker and barcodeScanner conflict

Please provide the following:

  1. SDK Version: 37
  2. Platforms(Android/iOS/web/all): Android

There is a bug where the preview is stopped when scanning a barcode, taking a picture using a picker, and going back to barcodeScanner. Does anyone know how to fix it?



function app({ navigation }){
  const [scanned, setScanned] = useState(false);

  const handleBarCodeScanned = ({data}) => {
    navigation.navigate('Picker',{ barcode: data})
  return (
          onBarCodeScanned={scanned ? undefined : handleBarCodeScanned}


function LanchCamera(){
    let result = await ImagePicker.launchCameraAsync({
      mediaTypes: ImagePicker.MediaTypeOptions.images,
      allowsEditing: true,
      aspect: [2, 2],
      quality: 0.5,
    if (!result.cancelled) {
      navigation.navigate('BarcodeScanner',{ Scan: false})

I omitted a lot, but it works roughly like this.
If I use launchImageLibraryAsync() it works fine.
There seems to be a problem with the act of taking pictures.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.