Scan Kit provides a system-level barcode scanning service that collaborates software and hardware. It innovatively introduces a simpler "scan-to-access" capability. You can utilize the system's scanning capability to achieve seamless redirection to your app with minimal integration workload, eliminating the need to develop a dedicated code scanning module within your app itself. The kit also offers barcode recognition and barcode image generation capabilities for all kinds of scenarios in your app.
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.
To make it easier for you to integrate the capability, a detailed sample project is provided for your reference.
Scan Kit provides various capabilities, including scan-to-access and in-app barcode scanning. You need to integrate the scan-to-access capability first to achieve one-step direct access to your app service with minimal effort.
Scan-to-access capability (recommended): allows users to access a specified page in your app by scanning a 2D or 1D barcode via a system-level entry such as Control Panel. This streamlines the access process, letting users reach the desired service page within your app in a single step.
Barcode scanning by default UI: offers a consistent scanning UI at the system level, which includes a camera preview stream, a scanning entry for the photo gallery, a prompt for users to turn on the flashlight in dim light conditions, and pre-authorization for the camera. This function is easy to be integrated and is suitable for general scanning scenarios.
Barcode scanning by custom UI: provides scanning capabilities and supports rendering the camera preview stream on the specified control. You need to implement the scanning UI and apply for camera permissions. This is suitable for scenarios that require a tailored scanning UI.
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.
Scan Kit supports recognition and generation for barcodes of 13 mainstream types in the world, as well as recognition for multifunctional codes. Currently, the following barcode types are supported: QR Code, Data Matrix, PDF417, Aztec, EAN-8, EAN-13, UPC-A, UPC-E, Codabar, Code 39, Code 93, Code 128, and ITF-14.
The scan-to-access capability currently supports only phones and tablets.
Barcode scanning either through the default UI or a custom UI is supported only on phones, tablets, and wearables. (Specifically, 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 only on phones, tablets, and wearables. Specifically, wearables are supported since API version 6.1.0(23).
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 |
|---|---|
| Scan-to-access capability | 1. This capability currently supports only HTTPS-based links. If you need to use other access modes, such as HTTP, submit a ticket to contact us. 2. Currently, this capability is available only in the Chinese mainland. |
| Barcode scanning by default UI | The isDefaultScanSupported API can be called to check whether a device in use supports barcode scanning on the default UI since API version 26.0.0. The title can be dynamically displayed based on the setting of scanTypes in ScanOptions since API version 6.1.0(23). The floating window and split-screen scenarios are supported since API version 6.0.0(20). Gallery-based barcode scanning can only recognize one barcode at a time. The default UI does not support custom settings. |
| Barcode scanning by custom UI | The isCustomScanSupported API can be called to check whether a device in use supports barcode scanning on a custom UI since API version 26.0.0. This capability requires the camera permission and needs you to implement the interactive scanning UI by yourself. |
| Barcode image generation | If the data that Scan Kit recognizes from a barcode image generated based on a byte array is garbled characters, a dedicated decoder is required to decode the byte array. Such cases include barcode recognition of 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.
Some APIs regarding barcode scanning by custom UI support Emulator-based development.
Since API version 6.0.0(20), Emulator-based development is available for certain APIs regarding barcode scanning on a custom UI (including init, start, stop, release, and rescan), which are enough for implementing basic functions of this barcode scanning scenario.
On the Emulator, barcode scanning on a custom UI supports only 1280 x 720 px. Other resolutions will be converted to 1280 x 720 px.
The Emulator does not support image-based barcode recognition or barcode image generation.
Scan Kit provides the sample code related to functions including barcode scanning by default UI, barcode scanning by custom UI, image-based barcode recognition, and barcode image generation. You can refer to the sample code to implement desired functions.