Problem
When multiple barcodes are scanned in real time, only one barcode is recognized.
Solution
Ensure that the enableMultiMode parameter in ScanOptions is set to true.
Verify that corresponding barcode types have been set in scanTypes of ScanOptions.
Currently, at most 4 barcodes can be recognized when multiple barcodes are scanned in real time.
If the fault persists, submit a ticket online. Huawei will get back to you as soon as possible.
Problem
When I upload my package to release my atomic service, AppGallery Connect displays an error message indicating that the device types in the uploaded package are inconsistent with the declared device types, and asks me to upload a correct package or modify the declared device types.
Solution
Verify that deviceTypes in the module.json5 file in the entry directory of your project are the same as the supported device types that you select in AppGallery Connect.
For example, if mobile phone is selected as a supported device type, include phone in the settings of deviceTypes in the module.json5 file.
If the fault persists, submit a ticket online. Huawei will get back to you as soon as possible.
Problem
Multi-barcode scanning failed when I scanned multiple barcodes based on the gallery using the default UI.
Solution
Gallery-based barcode scanning can only recognize one barcode at a time.
Problem
During 1D code recognition, 1D codes are recognized incorrectly sometimes.
Solution
1D code recognition is realized by matching the formation pattern of black and white bars of different widths. Since all types of 1D codes look similar, 1D codes may be recognized incorrectly sometimes. We are striving to continuously optimize the barcode recognition algorithms of Scan Kit to improve the recognition accuracy.
Problem
How do I implement the logic to determine whether scanning has been canceled on the default scanning UI?
Solution
If the default scanning UI is opened but scanning is directly canceled, you can determine whether scanning is canceled based on the 1000500002 error returned in the callback and then implement relevant logic.
Problem
When Scan Kit scans a barcode image generated from a byte array, the recognized content is garbled characters and cannot be decoded.
Solution
If the content that Scan Kit recognizes from a barcode image generated from a byte array is garbled characters, a dedicated decoder is required to decode the data. Such cases include barcode recognition of subway turnstiles.
Problem
When a 1D code is successfully recognized, the returned position data is empty.
Solution
The positions returned are in the same row or column. In the barcode recognition logic, the position information cannot be used to identify the four corners of the recognition rectangle. In this case, you need to handle the problem based on your own service logic.