|
|
|
|
|
- Overview
- Creating and configuring the Camera control to decode the bar codes
- Creating a Camera control
- Configuring the Camera control
- "Decoding a bar code" process
- Remark
Camera field: decode barcodes (prefix syntax)
In iOS and Android, bar codes can be decoded via the Camera control using BCCapture. This function opens a system window to decode the bar code. This system window cannot be customized. Another solution consists in using the Camera control. This allows you to include the control and to decode bar codes in complex GUIs. Creating and configuring the Camera control to decode the bar codes Creating a Camera control To create a Camera control: - On the "Creation" tab, in the "Graphic controls" group, click "Camera".
- Click at the desired location to create the control. The control appears in the editor.
Configuring the Camera control To configure the Camera control: - Open the control description window (select "Description" in the context menu).
- On the "Details" tab, configure the control setting:
- Type of decoding: :
- None: No barcode decoding.
- StrikeOut: Decoding without viewfinder.
- StrikeOut with viewfinder: A viewfinder shows the area in which the barcode is to be placed..
- StrikeOut with contrasted viewfinder: A viewfinder shows the area in which the barcode is to be placed, while sections outside this area are blurred..
- Type of bar code: Type of barcode to be decoded. All bar codes are supported.
- Viewfinder size: Size of viewfinder area, expressed as a percentage of the visible area. This option is only available if there is a viewfinder.
"Decoding a bar code" process When bar code decoding is enabled on the Video control, the "Decode a bar code" event associated with the Camera control is used to process the bar code read via the control. This event is executed when the bar code is detected. This event has the following format: PROCEDURE DécodeCodeBarre(cb est un CodeBarres) The information read can be retrieved by the BarCode variable passed as parameter. If this event returns: - CameraRequestPermission (or VideoRequestPermission) allows you to find out whether the device used is allowed to use the camera.
- Warning: If the preview of the Camera field is distorted, the image to be decoded will also be distorted.
- Decoding and taking photos:
- If the Camera field is in "Compatible 26" mode: photos and videos cannot be recorded if barcode detection is enabled (function <Camera>.Capture returns an error in this case)..
- If the Camera control is compatible with version 27:
- It is possible to take pictures while bar code decoding is enabled.
- It is not possible to record video when bar code decoding is enabled.
- If decoding is enabled when <Camera>.VideoStart is called, it will be stopped and restarted after the recording.
- If CameraStartDecoding is called while a video is being recorded, decoding will be enabled after the recording.
- If the Camera control is compatible with version 27:
- It is possible to take pictures while bar code decoding is enabled.
- It is possible to record video while bar code decoding is enabled.
- When the Camera control is configured to allow the decoding of bar codes (in the description window), the decoding automatically starts when the window is opened.
To prevent this behavior, you call call CameraStopDecoding (or <Camera>.StopDecoding) in the "Initialization" event of the Camera control. Bar code decoding can be restarted with CameraStartDecoding (or <Camera>.StartDecoding). - This feature is available from iOS 7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|