Micro QR Code
STRICH SDK 1.12 introduces support for Micro QR Codes.
Micro QR Code is a compact variant of the QR Code symbology, designed for applications where space is limited. Developed by Denso Wave, Micro QR Codes can encode smaller amounts of data compared to standard QR Codes but require significantly less space - up to 75% smaller in some cases.
Key characteristics of Micro QR Code include:
- Four versions (M1-M4) with varying data capacities, ranging from 5 numeric characters (M1) to 35 numeric characters (M4)
- Single finder pattern instead of three, making them more compact
- Four error correction levels depending on the version, ensuring reliable scanning even with partial damage
- Ideal for small components such as electronic parts, circuit boards, and industrial applications where space is at a premium
Micro QR code is standardized in the ISO/IEC 18004 standard.
Strarting with version 1.12.0, the SDK detects and decodes all Micro QR Code versions if the microqr symbology is enabled.
import {StrichSDK, PopupScanner} from "https://cdn.jsdelivr.net/npm/@pixelverse/strichjs-sdk@latest";
// ... SDK initialization code ...
const detections = await PopupScanner.scan({
engine: {
symbologies: ['qr', 'microqr']
}
});Programmatic Camera Controls
Version 1.12 introduces the possibility to programmatically control the camera zoom and flashlight.
- setZoom zooms the camera feed in or out
- setFlashlight turns the flashlight on or off
The effect of calling these methods is equivalent to tapping the corresponding buttons in the overlay. The overlay buttons are enabled with the showZoom and showFlashlight options.
Enhanced Detection Handling
Version 1.12 allows the app-supplied detection handler to return a value indicating to the SDK if a barcode was handled or not. Barcodes that are marked as unhandled are not highlighted in the overlay, and no audible or vibration feedback is emitted either.
In the code snippet below, the detection handler marks a barcode as handled only if the detected code has a value that matches the value “this code and this code only”.
import {StrichSDK, BarcodeReader} from "https://cdn.jsdelivr.net/npm/@pixelverse/strichjs-sdk@latest";
// ... BarcodeReader instantiation and configuration ...
// detection handler that marks a barcode as handled only if the detected value matches a specific value
barcodeReader.detected = (detections) => {
return detections.map(d => d.data === "this code and this code only");
};
// ... BarcodeReader initialization/start ...This change is fully backward-compatible. If the detection handler does not return a value, the barcode is considered as handled.