Configuration of the barcode scanner screen.

Hierarchy

  • PartiallyConstructible
    • BarcodeScannerConfiguration

Constructors

Properties

Configuration of the action bar.

Default Value

new ActionBarConfiguration({
"flashButton": new RoundButton({
"visible": true,
"backgroundColor": "?sbColorSurfaceHigh",
"foregroundColor": "?sbColorOnPrimary",
"activeBackgroundColor": "?sbColorWarning",
"activeForegroundColor": "#1C1B1F"
}),
"zoomButton": new RoundButton({
"visible": true,
"backgroundColor": "?sbColorSurfaceHigh",
"foregroundColor": "?sbColorOnPrimary",
"activeBackgroundColor": "?sbColorSurfaceHigh",
"activeForegroundColor": "?sbColorOnPrimary"
}),
"flipCameraButton": new RoundButton({
"visible": true,
"backgroundColor": "?sbColorSurfaceHigh",
"foregroundColor": "?sbColorOnPrimary",
"activeBackgroundColor": "?sbColorSurfaceHigh",
"activeForegroundColor": "?sbColorOnPrimary"
})
});
backgroundColor: string

Color of the screen's background.

Default Value

"?sbColorSurfaceLow";
cameraConfiguration: CameraConfiguration

Configuration of the camera behavior.

Default Value

new CameraConfiguration({});
cameraPermission: CameraPermissionScreen

Configuration of the dialog for requesting camera permissions.

Default Value

new CameraPermissionScreen({
"background": "?sbColorSurface",
"iconBackground": "?sbColorOutline",
"icon": new IconStyle({
"visible": true,
"color": "?sbColorOnSurface"
}),
"closeButton": new ButtonConfiguration({
"visible": true,
"text": "?cameraPermissionCloseButton",
"background": new BackgroundStyle({
"strokeColor": "#00000000",
"fillColor": "#00000000",
"strokeWidth": 0.0
}),
"foreground": new ForegroundStyle({
"iconVisible": false,
"color": "?sbColorPrimary",
"useShadow": false
})
}),
"enableCameraTitle": new StyledText({
"text": "?cameraPermissionEnableCameraTitle",
"color": "?sbColorOnSurface"
}),
"enableCameraExplanation": new StyledText({
"text": "?cameraPermissionEnableCameraExplanation",
"color": "?sbColorOnSurfaceVariant"
})
});

Configuration of the all strings for barcode scanner.

Default Value

new BarcodeTextLocalization({});
palette: Palette

Define the screen's base color values from which other colors are derived.

Default Value

new Palette({
"sbColorPrimary": "#C8193C",
"sbColorPrimaryDisabled": "#F5F5F5",
"sbColorNegative": "#FF3737",
"sbColorPositive": "#4EFFB4",
"sbColorWarning": "#FFCE5C",
"sbColorSecondary": "#FFEDEE",
"sbColorSecondaryDisabled": "#F5F5F5",
"sbColorOnPrimary": "#FFFFFF",
"sbColorOnSecondary": "#C8193C",
"sbColorSurface": "#FFFFFF",
"sbColorOutline": "#EFEFEF",
"sbColorOnSurfaceVariant": "#707070",
"sbColorOnSurface": "#000000",
"sbColorSurfaceLow": "#00000026",
"sbColorSurfaceHigh": "#0000007A",
"sbColorModalOverlay": "#000000A3"
});
recognizerConfiguration: BarcodeRecognizerConfiguration

Configuration of the scanning behavior.

Default Value

new BarcodeRecognizerConfiguration({});
screen: string

The configuration object should be applied for this screen.

Default Value

"BarcodeScanner";
sound: Sound

Configuration of the scan confirmation sound.

Default Value

new Sound({
"successBeepEnabled": true,
"soundType": "MODERN_BEEP"
});
timeouts: Timeouts

Configuration of timeouts.

Default Value

new Timeouts({
"autoCancelTimeout": 0,
"initialScanDelay": 0
});

Configuration of the top bar.

Default Value

new TopBarConfiguration({
"title": new StyledText({
"text": "?topBarTitle",
"color": "?sbColorOnPrimary"
}),
"mode": "SOLID",
"backgroundColor": "?sbColorPrimary",
"cancelButton": new ButtonConfiguration({
"visible": true,
"text": "?topBarCancelButton",
"background": new BackgroundStyle({
"strokeColor": "#00000000",
"fillColor": "#00000000",
"strokeWidth": 0.0
}),
"foreground": new ForegroundStyle({
"iconVisible": true,
"color": "?sbColorOnPrimary",
"useShadow": false
})
})
});

Configuration of the barcode scanner screen's behavior.

Default Value

new SingleScanningMode({});

Configuration of the text hint guiding users to move the view finder over a barcode.

Default Value

new UserGuidanceConfiguration({
"visible": true,
"title": new StyledText({
"text": "?userGuidance",
"color": "?sbColorOnPrimary"
}),
"background": new BackgroundStyle({
"strokeColor": "#00000000",
"fillColor": "?sbColorSurfaceLow",
"strokeWidth": 0.0
})
});
version: string

Version number of the configuration object.

Default Value

"1.0";
vibration: Vibration

Configuration of the scan scan confirmation vibration.

Default Value

new Vibration({
"enabled": true
});

Configuration of the view finder.

Default Value

new ViewFinderConfiguration({
"visible": true,
"style": new FinderCorneredStyle({
"strokeColor": "?sbColorSurface",
"strokeWidth": 2.0,
"cornerRadius": 10.0
}),
"overlayColor": "?sbColorSurfaceLow",
"aspectRatio": new AspectRatio({
"width": 1.0,
"height": 1.0
})
});

Generated using TypeDoc