ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Bar Code functions
  • Handling errors
  • Android strikethrough decoding
  • Decoding QRCode
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Decodes the information contained in a bar code. This bar code is contained in an image (image displayed in an Image control, file of an image or image in memory).
The type of bar code to be decoded depends on the execution platform:
  • AndroidAndroid Widget iPhone/iPad All bar codes managed by the system can be decoded.
Attention The strikethrough code must cover a sufficiently large area of the source image, with sufficient contrast and sharpness for decoding.
Example
Syntax
<Result> = BCDecode(<Image>)
<Result>: BarCode variable
BarCode variable initialized with the information read in the bar code.
<Image>: Character string
Image of bar code to decode. This parameter can correspond to:
Remarks

Handling errors

To find out whether the retrieval failed, use:
Android

Android strikethrough decoding

  • Up to version 2025barcode decoding uses the Zxing library (http://code.google.com/p/zxing).
    If this library is not on the device, it will be automatically available for download.
    Please note: This library requires that you use the device's landscape mode.
  • From version 2025 Update 1strikethrough decoding uses ML Kit's barcode reading API.

Decoding QRCode

The table below presents the relationship between the TypeContent and Content properties of the BarCode variable:
Type of contentType of value (..Content)Remark
bcTypeTextCharacter stringExample: "WINDEV is great!"
bcTypePhoneCharacter stringExemple: "0612345678"
bcTypeSMSCharacter string
The members of the SMS structure (SMS.Message and SMS.Number) will be automatically filled with the values read in the bar code. The content will correspond to a string of the form: <Numéro> + RC + <Message>
Example: "0612345678<CR>Text to send"
bcTypeURLCharacter stringExample: "http://www.google.com"
bcTypeMarketCharacter stringExample: "market://search?q=pname:com.company.application"
bcTypeWiFiCharacter stringCharacter string in the following format:
<SSID> + TAB + <Security protocol>+ TAB + <Key>
Example: "MyNetwork<TAB>WPA<TAB>pwd"
bcTypeEmailCharacter stringExample: "name@email.com"
bcTypeContactEmpty.
The members of the mContact structure will be automatically filled with the values read in the bar code.
bcTypeLocationgeoPosition variable.
The Latitude and Longitude properties of the variable will be automatically filled with the values read in the barcode.
Component: wd300barc.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help