Did you read the Block documentation? The documentation explains how to use both an external scanner (which most tutorials do) but it also explains that it can use its own internal code
The BarCode scanner tool uses an external scanner by default. On the Designer screen, Properties for the BarCode tool, untick the UseExternalScanner box and App Inventor will use the built in scanner code .
Some devices do not have an auto focused camera; many of these devices have issues focusing on some bar code images such as a QR code using the Camera . All scanners used the device Camera.