You are here:
Scan Prefixes and Suffixes
The scanner event sends all the data that’s included in a prefix-suffix bracket. The
prefix and suffix are registered with the Bluetooth scanner and are added to each scanned
result automatically. The event only contains the scanned code. For example, if you set ! as
the prefix and carriage return as the suffix, scan a barcode representation of 123456
results in !123456\r sent to the device. The bar code event contains only 123456. You can
change the prefix and suffix by calling the Facade.updateBTPrefixSuffixAsync() function.
Facade.updateBTPrefixSuffixAsync(prefix[Code], suffix[Code]) takes either strings or numbers as the parameters. Here are some sample calls to set the scan prefix and suffix.
Facade.updateBTPrefixSuffixAsync("!", "\n");
// Sets the prefix to "!" and the suffix toline feed (\n)
Facade.updateBTPrefixSuffixAsync(65, 32); // Sets the prefix to
"A" and the suffix to " "
Facade.updateBTPrefixSuffixAsync("_", 13); // Sets the prefix zu "_" and the
suffix tocarriage return (\r)
| ASCII Value | HEX | Character |
|---|---|---|
| 62 | 3E | > |
| 13 | 0D | \r |
If the default values don’t match your scanner settings, either change the
app settings by calling the Facade.updateBTPrefixSuffixAsync() function or change the scanner
settings to match the default values.

