Scan one or more barcodes using the camera on device.
A boolean value that indicates whether accept multiple barcode entries or just scan a single barcode.
A boolean value that indicates if duplicate barcode entries are allowed. Only applicable if ScanMultiple is set to True.
A enum value that specifies the barcode processing engine. There are 3 valid options: Default, System (for iOS only), Google.
Add a barcode scanner type.
Input Arguments:
Name | Type | Mandatory | Description |
|---|---|---|---|
Type | Enum | Yes | Supported barcode type of each scanner engine. |
Remove a barcode scanner type.
Input Arguments:
Name | Type | Mandatory | Description |
|---|---|---|---|
Type | Enum | Yes | Valid values are: UPCA, CODE128, QRCODE, CODE39, ITF14, CODABAR, UPCE, CODE93, DATAMATRIX, PDF417, AZTEK |
Clear the current list of barcode scanner types.
Activate the scanner.
Get the scanned value. Call this method in Completed event to get scanned barcode value.
Input Arguments:
Name | Type | Mandatory | Description |
|---|---|---|---|
Index | Integer | Yes | Specify an index to locate a barcode value in scanned value list. |
Triggered when barcode scanning is finished.
Parameters:
Name | Type | Description |
|---|---|---|
Status | Enum | See Status Code |
BarcodeCount | Integer | The number of barcodes that were scanned |
Message | String |
Define_Com Class(#xDeviceBarcodeScanner) Name(#BarcodeScanner)
Evtroutine Handling(#COM_OWNER.Initialize)
Clr_List Named(#BarcodeTypes)
#STD_TEXTS := 'upca'
Add_Entry To_List(#BarcodeTypes)
#STD_TEXTS := 'code128'
Add_Entry To_List(#BarcodeTypes)
#STD_TEXTS := 'qrcode'
Add_Entry To_List(#BarcodeTypes)
#STD_TEXTS := 'code39'
Add_Entry To_List(#BarcodeTypes)
#STD_TEXTS := 'itf14'
Add_Entry To_List(#BarcodeTypes)
#Scanner.Enabled := false
Endroutine
Evtroutine Handling(#BarcodeScanner.Initialize)
#Scanner.Enabled := true
Endroutine
Evtroutine Handling(#Scanner.Click)
Define Field(#vrccItemCount) Type(*INT)
Define Field(#vrccIx) Type(*INT)
#BarcodeScanner.ScanMultiple := (#ScanMultiple.ButtonState = Checked)
#BarcodeScanner.AllowDuplicates := (#AllowDuplicates.ButtonState = Checked)
#BarcodeScanner.ClearBarcodeTypes()
For Each(#item) In(#BarcodeTypes.Items)
If (#item.Checked = Checked)
Get_Entry Number(#item.Entry) From_List(#BarcodeTypes)
#BarcodeScanner.AddBarcodeType( #STD_TEXTS )
Endif
Endfor
#BarcodeScanner.ActivateScanner()
Endroutine
Evtroutine Handling(#BarcodeScanner.Completed) Status(#lStatus) Barcodecount(#lCount) Message(#lMessage)
Define Field(#vrbcIx) Type(*INT)
If (#lStatus = OK)
Begin_Loop Using(#vrbcIx) From(0) To(#lCount - 1)
#STD_TEXTL := #BarcodeScanner.GetScannedValue( #vrbcIx )
Add_Entry To_List(#ScannedValues)
End_Loop
Endif
Endroutine