|
|
|
|
|
- Use conditions
- Handling errors
- Application in the background: Specific case from Android 10
BCCapture (Function) In french: CBCapture Decodes the information stored in a bar code by using the device camera (Android, iPhone, iPad). Tip: Use the Camera control whenever possible:
bc is BarCode
bc = BCCapture()
IF ErrorOccurred = False _AND_ bc.TypeContent = bcTypeEmail THEN
Info("Email address: " + bc.RoughValue)
END
Syntax
<Result> = BCCapture([<Bar code type> [, <Enable flash>]])
<Result>: BarCode variable BarCode variable initialized with the information read in the bar code. <Bar code type>: Optional Integer constant Type of bar code that can be decoded: | | BC_AZTEC | Aztec bar code. | BC_CODE128 | Code128 bar code. | BC_CODE39 | Code39 bar code. | BC_CODE93 | Code93 bar code. | BC_DATAMATRIX | DATAMATRIX bar code. | BC_EAN128 | EAN128 bar code. | BC_EAN13 | EAN13 bar code. | BC_EAN8 | EAN8 bar code. | BC_INTER2OF5 | Interleaved 2 of 5 bar code. | BC_PDF417 | PDF417 bar code. | BC_QRCODE | QR Code bar code. | BC_UPCA | UPC-A bar code. | BC_UPCE | UPC-E bar code. | BC_ALL | All the types of bar codes supported by this function can be decoded. |
If this parameter is not specified, all types of codes supported by this function can be decoded. <Enable flash>: Optional boolean
Remarks Handling errors To determine whether the bar code failed to be read, use the ErrorOccurred variable. The function will fail in the following cases: - if it is used in the simulator,
- if it is used in the emulator,
- if it is used in a device not equipped with a camera.
- if the "Cancel" button was used. In this case, the TypeBarCode property of the BarCode variable will be different from BC_QRCODE.
Related Examples:
|
Cross-platform examples (WINDEV Mobile): WM Stocks
[ + ] This application is used to perform stocktaking and to save the results in a database. The example is used to create entries/exits in the stock, by directly scanning the bar code of products. It is optimized to be run on tablets.
|
|
Android (WINDEV Mobile): Android Inventory
[ + ] This application is used to perform inventories and to save the results in a database.
|
Business / UI classification: Neutral code Component: wd300android.aar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|