After user allow permission for camera it returns a blackscreen. Had been downloaded from ai2.appinventor.mit.edu -> apk
If using AI Companion -> "Knox ENrollment Service" - Sorry android camera encountered a problem. You may need to restart the device. (i've already tried restarting)
Tested on companion with real device, Google Pixel 4a (Android 13)
I didn't touch your blocks, but had to:
Untick the useExternalScanner checkbox in Designer (no other scanner app installed on my device)
Click the Scan button
Scanned a barcode
Set showUrl visible to true (in order to see the output)
Barcode number returned
No error messages, nothing about Knox Enrolment Service
Note, if the camera permission is required the AI2 Bar Code Scanner component should already be requesting it. If using an external scanner, you may have to request camera permission - if so, put it in Screen Initialise.