Device.fakeScan()

Overview

Send a scan to the session. If sent from the scan event WLEvent('scan', …), the scan event will not be called again. But if sent from outside the scan event then the scan event will be called.

Format

Device.fakeScan(format, data);

Parameter Description Type Required
format The format of the barcode. Many of the formats are listed below. String Required
data The data of the barcode. String Required

Example

Copy
/* Fake a scan from the scanner of type CODE 128.
 */
 
 Device.fakeScan('CODE_128', '00001');

Example Scan Formats

“UPCE0”

“UPCE1”

“UPCA”

“MSI”

“EAN8”

“EAN13”

“CODABAR”

“CODE39”

“D2OF5”

“I2OF5”

“CODE11”

“CODE93”

“CODE128”

“D2OF5IATA”

“GS1-128”

“PDF417”

“TRIOPTIC39”

“COUPONCODE”

“BOOKLAND”

“MICROPDF”

“CODE32”

“MACROPDF”

“MAXICODE”

“DATAMATRIX”

“QRCODE”

“MACROMICROPDF”

“GS1DATABAR”

“GS1LIMITED”

“RSSEXPANDED”

“GS1EXPANDED”

“SIGNATURE”

“WEBCODE”

“CUECODE”

“COMPOSITE”

“TLC39”

“POSTNET”

“PLANET”

“BRITISH_POSTAL”

“JAPAN_POSTAL”

“AUSTRALIA_POSTAL”

“DUTCH_POSTAL”

“CANADA_POSTAL”

“AZTEC”

“AZTECMESA”

“CODE49”

“OCR”

“CODABLOCK”

“MATRIX2OF5”

“PLESSEY”

“CHINA_POSTAL”

“KOREA_POSTAL”

“TELEPEN”

“CODE16K”

“POSICODE”

“USPS4CB”

“IDTAG”

“UPC”

“SUPP”

“MSR”

“RFID”

“COMPORT”