scan-barcode (legacy docs)
Last updated
Last updated
These scan-barcode
docs are out of date
New functionality and features were added to scan-barcode
in version 4.80.0 of the JourneyApps Runtime. Please refer to the latest docs here.
Option | Required | Details |
---|---|---|
Android | iOS | |
---|---|---|
Android | iOS |
---|---|
bind
required
Variable/attribute in which to store the input value of the field. Must be a variable or attribute of type 'string' or 'int'.
label
optional
Label to show on the component. It can be a Format String to make the text dynamic.
required
optional
Set to true
if the barcode must be present before proceeding to another view. Defaults to false
.
prompt
optional
Prompt to display on the barcode scanning screen.
types
optional
Comma-separated list of barcode types to try to scan, for example QR_CODE,UPC_A,UPC_E
.
Defaults to:
QR_CODE,CODE_39,CODE_128
.
extensions
optional
Comma-separated list of barcode type extensions.
show-if
optional
Controls whether the component is hidden or shown. The argument specified to show-if
can either be a literal boolean value (true
or false
), or it can specify a variable, parameter or field that can be a string, number, object, etc. that evaluates to false or evaluates to true.
If the component also specifies required="true"
, but it is hidden, the validation will be ignored/skipped.
hide-if
optional
Opposite of show-if
(see above).
on-scan
optional
The JavaScript/TypeScript function call to be performed when the barcode is scanned.
Product barcodes:
UPC_A
, UPC_E
, EAN_8
, EAN_13
, RSS_14
(all variants), RSS_EXPANDED
(most variants).
UPC_A
, UPC_E
, EAN_8
, EAN_13
Other 1D barcodes:
CODE_39
, CODE_93
, CODE_128
, ITF
, CODABAR
CODE_39
, CODE_128
2D barcodes:
QR_CODE
, DATA_MATRIX
, AZTEC
(beta quality), PDF_417
QR_CODE
, DATA_MATRIX
EAN_2
and EAN_5
Not supported on iOS