CodeScannerOptions
interface CodeScannerOptions extends BarcodeScannerOutputOptionsProperties
barcodeFormats
barcodeFormats: TargetBarcodeFormat[]Specifies the formats to be used for Barcode scanning.
If you want to detect all kinds of barcodes,
use ['all']
Inherited from
BarcodeScannerOutputOptions.barcodeFormats
isActive
isActive: booleanWhether the CodeScanner is active,
or not.
You can toggle isActive to pause/resume
the Camera if the app becomes inactive, or the user
to a different screen.
onBarcodeScanned()
onBarcodeScanned: (barcodes: Barcode[]) => voidCalled whenever barcodes have been detected.
Inherited from
BarcodeScannerOutputOptions.onBarcodeScanned
onError()
onError: (error: Error) => voidCalled when there was an error detecting barcodes.
Inherited from
BarcodeScannerOutputOptions.onError
outputResolution?
optional outputResolution: BarcodeScannerOutputResolutionControls which camera buffer resolution should be used.
'preview': Prefer preview-sized buffers for lower latency.'full': Prefer full/highest available buffers for better detail.
Default
'preview'Inherited from
BarcodeScannerOutputOptions.outputResolution
style
style: StyleProp<ViewStyle>Sets the style for this view.
Most commonly, you would use { flex: 1 }.