Scan Kit provides the system-level barcode scanning service that collaborates software and hardware, helping you quickly build capabilities that can recognize barcodes and generate barcode images for various scenarios in your atomic services. Leveraging multiple computer vision technologies and AI algorithms, Scan Kit can automatically scan barcodes that are far away from the camera and recognize barcodes in low-light environments as well as barcodes that are damaged, unclear, or in a hard-to-read position for accurate scanning in all kinds of environments. This leads to a higher barcode recognition rate and improved user experience.
Scan Kit offers the following capabilities for atomic services:
Barcode scanning by default UI: offers a consistent, system-level scanning UI that integrates a camera preview stream, a photo gallery entry, a low-light flash prompt, and camera permission pre-authorization. This function is easy to integrate and suitable for general scanning scenarios.
Image-based barcode recognition: scans and recognizes barcode images or images in the photo gallery.
Barcode image generation: generates a barcode image from text or a byte array.
Barcode scanning by default UI is supported only on phones, tablets, and wearables. (Specially, wearables with rear cameras are supported since API version 6.1.0(23). You can call the getSupportedCameras API to check whether a wearable has a rear camera.)
The image-based barcode recognition capability is supported on phones, tablets, and wearables since API version 26.0.0.
The barcode image generation capability supports phones, tablets, wearables, PCs/2-in-1 devices, and TVs. Specifically, wearables are supported since API version 5.1.0(18), and PCs/2-in-1 devices and TVs are supported since API version 5.1.1(19).
| Capability | Restriction |
|---|---|
| Barcode scanning by default UI | Since API version 26.0.0, the isDefaultScanSupported API can be used to check whether the current device supports barcode scanning on the default UI. Since API version 6.1.0(23), the title can be dynamically displayed based on the scanTypes parameter in ScanOptions. Since API version 6.0.0(20), the floating window and split-screen scenarios are supported. Gallery-based barcode scanning can only recognize one barcode at a time. The default UI does not support custom settings. |
| Barcode image generation | If data parsed from a byte-array-generated barcode image appears garbled, a dedicated decoder is required to decode the byte array. A typical example of this requirement is barcode recognition for subway turnstiles. |
This kit supports the Emulator, but there are some differences in feature support between real devices and the Emulator:
General differences: For details, please refer to Differences Between the Emulator and the Real Device.
Since API version 6.0.0(20), the function of barcode scanning on the default UI can be developed based on the Emulator. On the Emulator, the camera stream on the default scanning UI is flipped horizontally, and black borders will appear at the top and bottom of the scanning UI due to the fixed resolution of the camera stream.
The Emulator does not support image-based barcode recognition or barcode image generation.