May Updates of HMS Core Plugins - Huawei Developers

HMS Core provided the following updates in May for Flutter, React Native, Cordova, and Xamarin.
Framework​Plugin​Corresponding Native Kit Version​Changelog​FlutterPushPush 6.10.0.300
Resolved a performance-related issue.
Adapted to Android 13 (targetSdkVersion=33).​
HealthHealth 6.10.0.301
Supported the following data types: periodic breathing sampling events, aperiodic breathing sampling events, sleep breathing records, reading historical data, and continuous blood glucose data. Specifically speaking, the following fields are added to the HealthDataTypes class: DT_SLEEP_RESPIRATORY_DETAIL, DT_SLEEP_RESPIRATORY_EVENT, DT_HEALTH_RECORD_VENTILATOR, DT_CGM_BLOOD_GLUCOSE, and POLYMERIZE_CGM_BLOOD_GLUCOSE_STATISTICS.
Added the following fields to the HealthFields class: SYS_MODE, SYS_SESSION_DATE, EVENT_AHI, SYS_DURATION, LUMIS_TIDVOL_MEDIAN, LUMIS_TIDVOL, LUMIS_TIDVOL_MAX, CLINICAL_RESPRATE_MEDIAN, CLINICAL_RESP_RATE, CLINICAL_RESP_RATE_MAX, LUMIS_IERATIO_MEDIAN, LUMIS_IERATIO_QUANTILE, LUMIS_IERATIO_MAX, MASK_OFF, HYPOVENTILATION_INDEX, OBSTRUCTIVE_APNEA_INDEX, PRESSURE_BELOW, HYPOVENTILATION_EVENT_TIMES, SNORING_EVENT_TIMES, CENTER_APNEA_EVENT_TIMES, OBSTRUCTIVE_APNEA_EVENT_TIMES, AIR_FLOW_LIMIT_EVENT_TIMES, MASSIVE_LEAK_EVENT_TIMES, UNKNOW_EVENT_TIMES, and ALL_EVENT_TIMES.
Added the following fields to the Field class: SLEEP_RESPIRATORY_TYPE, SLEEP_RESPIRATORY_VALUE, and EVENT_NAME.
Added the following fields to the Scope class: HEALTHKIT_HISTORYDATA_OPEN_WEEK, HEALTHKIT_HISTORYDATA_OPEN_MONTH, and HEALTHKIT_HISTORYDATA_OPEN_YEAR.
Added the following result codes to the HiHealthStatusCodes class: 50064 (HEALTH_APP_NOT_ENABLED) and 50065 (HISTORY_PERMISSIONS_INSUFFCIENT).
[IMPORTANT] Removed setTimeInterval and setFieldValue, as well as their related fields, from SampleSet. SampleSets are now native-like.
Changed healthRecordId from a mandatory field for HealthRecord to an optional one. Note that this field is still necessary for health record update and deletion.
Added the function of integrating the HMS Core Installer SDK to prompt users to download HMS Core (APK), to make sure that your app can properly use capabilities of HMS Core (APK).
ScanScan 2.10.0.301
Updated the Scan SDK to its latest version (2.10.0.301).
Added relevant instructions in the "Adding Permissions" section.
Updated the development procedure and code of the Default View mode.
Added RESULT_CODE (indicating the scanning result) to ScanUtil.
Added setErrorCheck(boolean var1) for listening to errors to HmsScanAnalyzerOptions.Creator.
Added supplementary information about the personal information collected by the SDK.
React NativePush
Resolved a performance-related issue.
Adapted to Android 13 (targetSdkVersion=33).
HealthHealth 6.10.0.301
Updated targetSDKversion to 33, to make sure that your app can run properly on Android 13.
Added and opened the following data types: periodic breathing sampling events and aperiodic breathing sampling events.
Added and opened the data of sleep breathing records.
Added the following fields to HealthDataTypes: DT_HEALTH_RECORD_VENTILATOR (sleep breathing records), DT_SLEEP_RESPIRATORY_DETAIL (periodic breathing sampling events), and DT_SLEEP_RESPIRATORY_EVENT (aperiodic breathing sampling events).
Allowed for querying historical user data by week, month, and year.
Opened continuous blood glucose data.
Added error codes HEALTH_APP_NOT_ENABLED and HISTORY_PERMISSIONS_INSUFFCIENT.
Added constants HEALTHKIT_HISTORYDATA_OPEN_WEEK, HEALTHKIT_HISTORYDATA_OPEN_MONTH, and HEALTHKIT_HISTORYDATA_OPEN_YEAR to Scopes, respectively indicating the scopes of reading historical data by week, month, and year.
Added DT_CGM_BLOOD_GLUCOSE and POLYMERIZE_CGM_BLOOD_GLUCOSE_STATISTICS to HealthDataTypes, respectively indicating the continuous blood glucose data type and the continuous blood glucose statistical data type.
Optimized the data openness scopes of Health Kit.
ScanScan 2.10.0.301
Supported ultra-large display of barcodes in split-screen mode.
Supported smart lamps for kids.
Supported some features of the e-ink tablets.
Added setErrorCheck(boolean var1) for listening to errors to HmsScanAnalyzerOptions.Creator.
Added RESULT_CODE (indicating the scanning result) to ScanUtil.
Changed the scanning UI title of the Default View mode from Scan to either Scan QR code or Scan QR code/barcode, which can be set via the setViewType method added to the HmsScanAnalyzerOptions.Creator class.
Fixed the issue of occasional first-frame overexposure on some device models, to improve the barcode recognition rate.
Supported Android 13.
Updated targetSdkVersion to 33.
CordovaPushPush 6.10.0.300
Resolved a performance-related issue.
Adapted to Android 13 (targetSdkVersion=33).
HealthHealth 6.10.0.301
Updated the value ranges of some fields of the following data types: weight, body temperature, blood pressure, and blood glucose.
Added the following fields to HealthDataTypes: DT_HEALTH_RECORD_VENTILATOR (sleep breathing records), DT_SLEEP_RESPIRATORY_DETAIL (periodic breathing sampling events), and DT_SLEEP_RESPIRATORY_EVENT (aperiodic breathing sampling events).
Added DT_CGM_BLOOD_GLUCOSE and POLYMERIZE_CGM_BLOOD_GLUCOSE_STATISTICS to HealthDataTypes, respectively indicating the continuous blood glucose data type and the continuous blood glucose statistical data type.
Added constants HEALTHKIT_HISTORYDATA_OPEN_WEEK, HEALTHKIT_HISTORYDATA_OPEN_MONTH, and HEALTHKIT_HISTORYDATA_OPEN_YEAR to Scopes, respectively indicating the scopes of reading historical data by week, month, and year.
Added error codes HEALTH_APP_NOT_ENABLED and HISTORY_PERMISSIONS_INSUFFCIENT.
Modified the parameters of addActivityRecord, addHealthRecord, and updateHealthRecord.
Updated targetSDKversion to 33.
ScanScan 2.10.0.301
Supported ultra-large display of barcodes in split-screen mode.
Supported smart lamps for kids.
Supported some features of the e-ink tablets.
Added setErrorCheck(boolean var1) for listening to errors to HmsScanAnalyzerOptions.Creator.
Added RESULT_CODE (indicating the scanning result) to ScanUtil.
Changed the scanning UI title of the Default View mode from Scan to either Scan QR code or Scan QR code/barcode, which can be set via the setViewType method added to the HmsScanAnalyzerOptions.Creator class.
Fixed the issue of occasional first-frame overexposure on some device models, to improve the barcode recognition rate.
Supported Android 13.
Updated targetSdkVersion to 33.
XamarinPushPush 6.10.0.300
Resolved a performance-related issue.
HealthHealth 6.10.0.301
Updated targetSDKversion to 33, to make sure that your app can run properly on Android 13.
Added and opened the following data types: periodic breathing sampling events and aperiodic breathing sampling events.
Added and opened the data of sleep breathing records.
Added the following fields to HealthDataTypes: DT_HEALTH_RECORD_VENTILATOR (sleep breathing records), DT_SLEEP_RESPIRATORY_DETAIL (periodic breathing sampling events), and DT_SLEEP_RESPIRATORY_EVENT (aperiodic breathing sampling events).
Allowed for querying historical user data by week, month, and year.
Opened continuous blood glucose data.
Added error codes HEALTH_APP_NOT_ENABLED and HISTORY_PERMISSIONS_INSUFFCIENT.
Added constants HEALTHKIT_HISTORYDATA_OPEN_WEEK, HEALTHKIT_HISTORYDATA_OPEN_MONTH, and HEALTHKIT_HISTORYDATA_OPEN_YEAR to Scopes, respectively indicating the scopes of reading historical data by week, month, and year.
Added DT_CGM_BLOOD_GLUCOSE and POLYMERIZE_CGM_BLOOD_GLUCOSE_STATISTICS to HealthDataTypes, respectively indicating the continuous blood glucose data type and the continuous blood glucose statistical data type.
Optimized the data openness scopes of Health Kit.
ScanScan 2.10.0.301
Supported ultra-large display of barcodes in split-screen mode.
Supported smart lamps for kids.
Supported some features of the e-ink tablets.
Added setErrorCheck(boolean var1) for listening to errors to HmsScanAnalyzerOptions.Creator.
Added RESULT_CODE (indicating the scanning result) to ScanUtil.
Changed the scanning UI title of the Default View mode from Scan to either Scan QR code or Scan QR code/barcode, which can be set via the setViewType method added to the HmsScanAnalyzerOptions.Creator class.
Fixed the issue of occasional first-frame overexposure on some device models, to improve the barcode recognition rate.
Added setErrorCheck(boolean var1) for listening to errors to NativeView.
HMS Core has provided plugins for many kits on multiple platforms for developers. Welcome to HUAWEI Developers for more plugin information.

Related

HUAWEI HMS Scan Kit vs Zxing

This is originally from HUAWEI Developer Forum (https://forums.developer.huawei.com/forumPortal/en/home)​
Brief Introduction of Both
Zxing is a common third-party open-source SDK. However, Zxing has the following defect: It only implements basic operations of scanning the QR code and does not support more complex scanning environments such as strong light, bending, and deformation. Currently, the mainstream practice is to optimize the source code based on Zxing. However, the optimization effect is still not ideal, and many people will spend a lot of time on the optimization.
The Huawei Scan Kit service provides convenient bar code and QR code scanning, parsing, and generation capabilities, helping developers quickly build the QR code scanning function in apps. Thanks to Huawei’s long-term accumulation in the computer vision field, Huawei’s unified barcode scanning service (Scan Kit) can detect and automatically amplify long-distance or small-sized codes, and optimize the identification of common complex barcode scanning scenarios (such as reflection, dark light, smudge, blur, and cylinder). Improves the QR code scanning success rate and user experience.
Now, let’s compare the capabilities of Zxing and Huawei HMS Scan Kit from the following aspects:
long-distance code scanning
The success of long-distance QR code scanning depends on the QR code specifications (the more information is, the more difficult it is to identify) and the distance between the camera and the QR code.
Due to the lack of automatic zoom-in optimization for Zxing, it is difficult to recognize the code when the code is less than 1/5 of the screen.
The HMS Scan Kit has a pre-detection function, which can automatically amplify the QR code at a long distance even if the QR code cannot be identified by naked eyes.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Conclusion: Scan Kit Wins
Scanning Codes in Complex Scenarios
In complex scenarios, code scanning can be classified into reflection, dark light, smudge, blur, and cylinder scanning. In complex scenarios, the recognition effect of Zxing is poor. Complex scenarios are as follows:
These scenarios are common in daily life. For example, outdoor scenarios such as reflection, dark light, and smudge may occur. When a QR code is attached to a product, curved surfaces or even edges and corners may occur. When you walk and scan the QR code, you will also encounter the challenge of motion blur. The following figure shows the test comparison in these scenarios.
Conclusion: Scan Kit Wins
Scan the QR code at any angle
Currently, Zxing supports only forward scanning, that is, Zxing cannot identify the code with a certain angle. Scan Kit can easily achieve this. When the code deflection is within 10 degrees, Zxing can still have high recognition accuracy. However, when the code deflection exceeds 10 degrees, the recognition accuracy of Zxing decreases sharply. However, Scan Kit is not affected by the clip angle, and the recognition accuracy does not decrease.
Comparison Conclusion: Scan Kit Wins
Multi-code identification comparison
Multi-code identification helps identify multiple codes at a time in scenarios such as express delivery and supermarket checkout, improving service processing efficiency. In multi-code identification mode, the Scan Kit can identify five types of codes on the screen at the same time and return the corresponding types and values of all codes at a time.
Conclusion: Scan Kit Wins
SDK Package Size
The size of the Zxing package is about 500 KB, which is a satisfactory size. Scan Kit has two modes: Lite and Pro. In Lite mode, the package size is 700 KB. In Pro mode, the package size is 3.3 MB. If you use the table, you will have a clearer understanding.
These two modes are slightly different on non-Huawei phones. Therefore, if you are not sensitive to the package size on non-Huawei phones, try to select the Pro version. I have also performed tests on non-Huawei Lite versions, but the test results are slightly lower than those of the Pro version.
Conclusion: Zxing has advantages.
Platform Support
Zxing and Scan Kit support both iOS and Android platforms.
Conclusion: The score is even.
Integration Modes
The integration mode of Zxing is relatively simple. It can be quickly integrated with SDK by only a few lines of code. However, in the actual product development process, the development of the product interface and auxiliary functions is also involved. However, Zxing does not provide the corresponding quick integration mode. The integration guide is available on the live network for a long time. Therefore, the development difficulty can be reduced. In summary, the first point in Zxing integration is that no default interface is available. Second, you need to achieve their own automatic amplification, flash and other functions.
Scan Kit provides multiple access modes, including single-code access, multi-code access, and customized access. The differences between the two integration modes are as follows:
The default layout is provided for the single-code access of Scan Kit cameras. In addition, functions such as automatic amplification and flash are preset. Developers do not need to manually configure these functions. The code integration volume is 5 lines, which is especially suitable for scenarios where quick integration and quick replacement of the QR code scanning function are required.
The customized access of Scan Kit allows users to design the layout by themselves. Only the basic functions and blank layout of scanning and decoding are provided. Users can design the layout based on their app style. However, they need to implement functions such as automatic zoom and flash. The corresponding technical documents can be found on the optical network of Huawei developers. However, compared with the single-code access, this access mode is more complicated.
The integration mode is as follows:
Zxing
1. Create a project and import the Zxing module.
2. Add rights and dynamically apply for rights.
3. Copy the onActivity method.
4. Invoking the Decoding Function
5. Compile the UI and ensure that the UI is correctly displayed.
Scan Kit
The default view mode provides two functions: camera QR code scanning and image-based QR code scanning. In this mode, developers do not need to develop the UI for QR code scanning.
The process is almost the same as that of Zxing.
1. Create a project and import the Scan Kit module.
2. Add permissions and dynamically apply for permissions.
3. Copy the onActivity method.
4. Invoke the decoding function.
The following uses the Default View Mode as an example to describe the integration procedure.
Create a project and add online dependency in the app/build.gradle file.
Code:
implementation'com.huawei.hms:scan:{version}'
2. Declare the QR code scanning page in the AndroidManifest.xml file of the calling module.
Code:
<!-Camera permission-->
<uses-permission android:name="android.permission.CAMERA" />
<!--Reading the file permission-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--Features-->
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
3. Create QR code scanning options based on the site requirements.
Code:
HmsScanAnalyzerOptions options = new HmsScanAnalyzerOptions.Creator().setHmsScanTypes(HmsScan.QRCODE_SCAN_TYPE, HmsScan.DATAMATRIX_SCAN_TYPE).create();
4. Invoke the static method startScan of ScanUtil to start the Default View QR code scanning page.
Code:
ScanUtil.startScan(this, REQUEST_CODE_SCAN_ONE, options);
The comparison shows that Scan Kit and Zxing have the same dependency and permission application methods. However, Scan Kit can use the UI by default (with built-in flash, automatic focal length, and QR code import). Zxing needs to implement the UI by itself, then, manually complete these functions.
Conclusion: Scan Kit Wins
Technical Analysis
Why is Scankit better than Zxing? The following describes the technical analysis of Zxing and Scan Kit from the perspective of technical implementation principles.
Zxing
Zxing uses the traditional recognition algorithm. It can detect codes by analyzing the codes from a certain angle. This algorithm allows only a certain degree of deformation, for example, the square code can be slightly skewed by less than 10 degrees, his pixels still fit the pattern, but if they’re deformed too much or angularly too large, they can’t detect the position of the code. The detection process of ZXing is classified into two types: one-dimensional code detection and two-dimensional code serial detection.
In one-dimensional code detection, Zxing uses a progressive scanning mechanism for feature recognition. Because one-dimensional code features are black-and-white crossover, when the black-and-white sequence with equal spacing of the class is identified, it is considered as a potential code. The length of the potential code is determined by finding the start bit and the end bit. Then, the sequence is sent to different one-dimensional code decoding modules for serial decoding, which takes a long time. When serial decoding fails, a failure message is displayed, and the failure time is also long. In addition, once the one-dimensional code has a wrinkle, rotation, or deformation, a sequence that meets a specific requirement cannot be found through progressive scanning, that is, the one-dimensional code cannot be detected in a complex condition.
1、Quiet zone(fround) 2.Start character 3.Data symbols 4.Terminator 5、Quiet zone(behind)
In two-dimensional code detection, Zxing uses different detection algorithms for different two-dimensional codes. For example, the most common QR code has three location detection patterns. Therefore, Zxing still uses the interlaced scanning mode to find the features of the location detection pattern. Once the features whose black-and-white ratio is 1:1:3:1:1 are found, that is, a central point of the position detection graph is used as a reference point to perform affine transformation, so that the corrected picture is sent to the QR decoding module. The positioning point of the QR code has a function of correcting rotation, and therefore can be well adapted to a rotation situation. However, Zxing is completely unable to process cases such as partial blocking, deformation, and contaminating and reflecting of the positioning point. As shown in the figure, the detection position detection graph is the most important step for detecting whether the two-dimensional code is successfully detected. Once a location fails to be detected, the two-dimensional code cannot be detected.
HUAWEI Scan Kit
Scan Kit uses the deep learning algorithm, which is spatially invariant. By training detectors of corresponding code types, Scan Kit can quickly find all required codes.
Actual process:
The bar code detection module and angle prediction module use the deep learning model.
Barcode detection: The serial process of separate detection of two-dimensional codes of one-dimensional codes in Zxing is no longer restricted. A trained detector can be used to directly obtain the code pattern and corresponding position. The bar code can be accurately sent to the corresponding decoding module through one detection, and a separate serial decoding process is no longer required. Because decoding includes a series of operations with high overheads such as skipping scanning, and information of different codes cannot be shared, this operation greatly reduces an end-to-end delay, and avoids a lot of repeated and unnecessary calculation overheads.
Angle prediction: The corresponding three-bit angle of the code is returned for radiographic transformation. In practice, the core of barcode detection is to accurately obtain boundary points. After being converted into binary images, the images are sent to the decoding module, but the decoding effect is still poor. This is also the most important step to solve the bar code identification in complex scenarios.
To sum up, the deep learning changes the serial detection and decoding process of the barcode of Zxing to a parallel process. In addition, the three-digit angle value of the barcode is returned. After the affine change, the aligned standard front barcode is obtained. This greatly improves the barcode detection success rate and greatly reduces the latency.
Nice and useful article
do huawei and zxing scan detect damaged qr code?
riteshchanchal said:
do huawei and zxing scan detect damaged qr code?
Click to expand...
Click to collapse
Hi, it depends on the broken level of your QR code. If the QR code is a little unclear or slightly broken, it can be avaliable.
If possible, I think you can send a picture or describe the degree of the broken condition. It will help you get a more accurate reply.

Comparison Between Zxing and Huawei HMS Scan Kit

About This Document
Zxing is a common third-party open-source SDK. However, Zxing has the following defect: It only implements basic operations of scanning the QR code and does not support more complex scanning environments such as strong light, bending, and deformation. Currently, the mainstream practice is to optimize the source code based on Zxing. However, the optimization effect is still not ideal, and many people will spend a lot of time on the optimization.
The Huawei Scan Kit service provides convenient bar code and QR code scanning, parsing, and generation capabilities, helping developers quickly build the QR code scanning function in apps. Thanks to Huawei's long-term accumulation in the computer vision field, Huawei's unified barcode scanning service (Scan Kit) can detect and automatically amplify long-distance or small-sized codes, and optimize the identification of common complex barcode scanning scenarios (such as reflection, dark light, smudge, blur, and cylinder). Improves the QR code scanning success rate and user experience.
Now, let's compare the capabilities of Zxing and Huawei HMS Scan Kit from the following aspects:
 Remote code scanning
 Scan QR codes in complex scenarios
 Scan the barcode at any angle.
 multicode recognition
 Integration difficulty
 SDK Package Size
 Cross-platform support
Comparison of long-distance code scanning
The success of long-distance QR code scanning depends on the QR code specifications (the more information is, the more difficult it is to identify) and the distance between the camera and the QR code. Due to the lack of automatic zoom-in optimization for Zxing, it is difficult to recognize the code when the code is less than 1/5 of the screen. The HMS Scan Kit has a pre-detection function, which can automatically amplify the QR code at a long distance even if the QR code cannot be identified by naked eyes.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
https://communityfile-drcn.op.hiclo...A1B389BE789A4FD4B3C70DF5A2582CD647359FF7D.gif
Comparison Conclusion: Scan Kit Wins
Comparison by Scanning Codes in Complex Scenarios
In complex scenarios, code scanning can be classified into reflection, dark light, smudge, blur, and cylinder scanning. In complex scenarios, the recognition effect of Zxing is poor. Complex scenarios are as follows:
These scenarios are common in daily life. For example, outdoor scenarios such as reflection, dark light, and smudge may occur. When a QR code is attached to a product, curved surfaces or even edges and corners may occur. When you walk and scan the QR code, you will also encounter the challenge of motion blur. The following figure shows the test comparison in these scenarios.
https://communityfile-drcn.op.hiclo...4F29750B35AD76B2B0183B45B46F9DFCAF24F3105.gif
https://communityfile-drcn.op.hiclo...9C42B539997998371B63EA6A0451ED87ED041DFEE.gif
https://communityfile-drcn.op.hiclo...CE580ECA67EEEBBCC9E7D7238AA5052D87B882D79.gif
Comparison Conclusion: Scan Kit Wins
Scan the QR code at any angle for comparison.
Currently, Zxing supports only forward scanning, that is, Zxing cannot identify the code with a certain angle. Scan Kit can easily achieve this. When the code deflection is within 10 degrees, Zxing can still have high recognition accuracy. However, when the code deflection exceeds 10 degrees, the recognition accuracy of Zxing decreases sharply. However, Scan Kit is not affected by the clip angle, and the recognition accuracy does not decrease.
https://communityfile-drcn.op.hiclo...4B65A180C69FEEF682C5E2069485FD83D8CA58C18.gif
Comparison Conclusion: Scan Kit Wins
Multi-code identification comparison
Multi-code identification helps identify multiple codes at a time in scenarios such as express delivery and supermarket checkout, improving service processing efficiency. In multi-code identification mode, the Scan Kit can identify five types of codes on the screen at the same time and return the corresponding types and values of all codes at a time.
Comparison Conclusion: Scan Kit Wins
SDK Package Size Comparison
The size of the Zxing package is about 500 KB, which is a satisfactory size. Scan Kit has two modes: Lite and Pro. In Lite mode, the package size is 700 KB. In Pro mode, the package size is 3.3 MB. If you use the table, you will have a clearer understanding.
These two modes are slightly different on non-Huawei phones. Therefore, if you are not sensitive to the package size on non-Huawei phones, try to select the Pro version. I have also performed tests on non-Huawei Lite versions, but the test results are slightly lower than those of the Pro version.
Conclusion: Zxing has advantages.
Platform Support Comparison
Zxing and Scan Kit support both iOS and Android platforms.
Conclusion: The score is even.
Comparison of Integration Modes
The integration mode of Zxing is relatively simple. It can be quickly integrated with SDK by only a few lines of code. However, in the actual product development process, the development of the product interface and auxiliary functions is also involved. However, Zxing does not provide the corresponding quick integration mode. The integration guide is available on the live network for a long time. Therefore, the development difficulty can be reduced. In summary, the first point in Zxing integration is that no default interface is available. Second, you need to achieve their own automatic amplification, flash and other functions.
Scan Kit provides multiple access modes, including single-code access, multi-code access, and customized access. The differences between the two integration modes are as follows:
The default layout is provided for the single-code access of Scan Kit cameras. In addition, functions such as automatic amplification and flash are preset. Developers do not need to manually configure these functions. The code integration volume is 5 lines, which is especially suitable for scenarios where quick integration and quick replacement of the QR code scanning function are required.
The customized access of Scan Kit allows users to design the layout by themselves. Only the basic functions and blank layout of scanning and decoding are provided. Users can design the layout based on their app style. However, they need to implement functions such as automatic zoom and flash. The corresponding technical documents can be found on the optical network of Huawei developers. However, compared with the single-code access, this access mode is more complicated.
The integration mode is as follows:
Zxing integration process
1. Create a project and import the Zxing module.
2. Add rights and dynamically apply for rights.
3. Copy the onActivity method.
4. Invoking the Decoding Function
5. Compile the UI and ensure that the UI is correctly displayed.
Scan Kit integration process
The default view mode provides two functions: camera QR code scanning and image-based QR code scanning. In this mode, developers do not need to develop the UI for QR code scanning.
The process is almost the same as that of Zxing.
1. Create a project and import the Scan Kit module.
2. Add permissions and dynamically apply for permissions.
3. Copy the onActivity method.
4. Invoke the decoding function.
The following uses the Default View Mode as an example to describe the integration procedure.
1. Create a project and add online dependency in the app/build.gradle file.
implementation'com.huawei.hms:scan:{version}'
2. Declare the QR code scanning page in the AndroidManifest.xml file of the calling module.
<!-Camera permission-->
<uses-permission android:name="android.permission.CAMERA" />
<!--Reading the file permission-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--Features-->
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
3. Create QR code scanning options based on the site requirements.
HmsScanAnalyzerOptions options = new HmsScanAnalyzerOptions.Creator().setHmsScanTypes(HmsScan.QRCODE_SCAN_TYPE, HmsScan.DATAMATRIX_SCAN_TYPE).create();
4. Invoke the static method startScan of ScanUtil to start the Default View QR code scanning page.
ScanUtil.startScan(this, REQUEST_CODE_SCAN_ONE, options);
The comparison shows that Scan Kit and Zxing have the same dependency and permission application methods. However, Scan Kit can use the UI by default (with built-in flash, automatic focal length, and QR code import). Zxing needs to implement the UI by itself, then, manually complete these functions.
Comparison Conclusion: Scan Kit Wins
Technical Analysis
Why is Scankit better than Zxing? The following describes the technical analysis of Zxing and Scan Kit from the perspective of technical implementation principles.
Zxing Technology Analysis
Zxing uses the traditional recognition algorithm. It can detect codes by analyzing the codes from a certain angle. This algorithm allows only a certain degree of deformation, for example, the square code can be slightly skewed by less than 10 degrees, his pixels still fit the pattern, but if they're deformed too much or angularly too large, they can't detect the position of the code. The detection process of ZXing is classified into two types: one-dimensional code detection and two-dimensional code serial detection.
In one-dimensional code detection, Zxing uses a progressive scanning mechanism for feature recognition. Because one-dimensional code features are black-and-white crossover, when the black-and-white sequence with equal spacing of the class is identified, it is considered as a potential code. The length of the potential code is determined by finding the start bit and the end bit. Then, the sequence is sent to different one-dimensional code decoding modules for serial decoding, which takes a long time. When serial decoding fails, a failure message is displayed, and the failure time is also long. In addition, once the one-dimensional code has a wrinkle, rotation, or deformation, a sequence that meets a specific requirement cannot be found through progressive scanning, that is, the one-dimensional code cannot be detected in a complex condition.
In two-dimensional code detection, Zxing uses different detection algorithms for different two-dimensional codes. For example, the most common QR code has three location detection patterns. Therefore, Zxing still uses the interlaced scanning mode to find the features of the location detection pattern. Once the features whose black-and-white ratio is 1:1:3:1:1 are found, that is, a central point of the position detection graph is used as a reference point to perform affine transformation, so that the corrected picture is sent to the QR decoding module. The positioning point of the QR code has a function of correcting rotation, and therefore can be well adapted to a rotation situation. However, Zxing is completely unable to process cases such as partial blocking, deformation, and contaminating and reflecting of the positioning point. As shown in the figure, the detection position detection graph is the most important step for detecting whether the two-dimensional code is successfully detected. Once a location fails to be detected, the two-dimensional code cannot be detected.
Technical Analysis of Huawei HMS Scan Kit
Scan Kit uses the deep learning algorithm, which is spatially invariant. By training detectors of corresponding code types, Scan Kit can quickly find all required codes.
Actual process:
The bar code detection module and angle prediction module use the deep learning model.
Barcode detection: The serial process of separate detection of two-dimensional codes of one-dimensional codes in Zxing is no longer restricted. A trained detector can be used to directly obtain the code pattern and corresponding position. The bar code can be accurately sent to the corresponding decoding module through one detection, and a separate serial decoding process is no longer required. Because decoding includes a series of operations with high overheads such as skipping scanning, and information of different codes cannot be shared, this operation greatly reduces an end-to-end delay, and avoids a lot of repeated and unnecessary calculation overheads.
Angle prediction: The corresponding three-bit angle of the code is returned for radiographic transformation. In practice, the core of barcode detection is to accurately obtain boundary points. After being converted into binary images, the images are sent to the decoding module, but the decoding effect is still poor. This is also the most important step to solve the bar code identification in complex scenarios.
To sum up, the deep learning changes the serial detection and decoding process of the barcode of Zxing to a parallel process. In addition, the three-digit angle value of the barcode is returned. After the affine change, the aligned standard front barcode is obtained. This greatly improves the barcode detection success rate and greatly reduces the latency.
More information
Demos, sample codes, and development documents are available on the Huawei developer official website.
Demo and sample code:
https://developer.huawei.com/consumer/en/doc/development/HMS-Examples/scan-sample-code4
Development guide:
https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/scan-introduction-4
API reference:
https://developer.huawei.com/consumer/en/doc/development/HMS-References/scan-apioverview
To be supplemented
Based on Huawei machine learning service, we will share a series of practical experience later. You can continue to pay attention to it.

HUAWEI Analytics Kit - Attribution Analysis

You may have the following questions when planning app promotion activities:
Which promotional channels should I select to obtain an ideal return on investment (ROI)?
How do I allocate promotional budget?
How do I properly configure the traffic of each promotion slot?
Why did I get a mediocre promotion impact after investing so much resource and money?
Which promotion channels should I invest more in and which ones should I abandon?
If you seek answers to these questions only based on subjective judgment, the promotion effect will be watered-down. To get objective and exact answers, you need to analyze the factors that contribute to the final conversion, and determine the allocation and combination of resources by studying the contribution rate of different channels or activities to the conversion.
The attribution analysis of HUAWEI Analytics Kit is a powerful tool that you can use during this process.
1. What Is Attribution Analysis?
Attribution analysis measures the contribution of a to-be-attributed event (such as push message tapping) to a target conversion event (such as order placing). By defining target conversion events and to-be-attributed events and selecting attribution models, you can get the accurate contribution distribution of each conversion. This helps you optimize resource allocation and provides basis for marketing decision-making. That is, this allows you to spend the budget where it matters most.
An attribution model is one or a set of rules that determine how sales and conversion success is attributed to touch points in the conversion path. Attribution models provided by HUAWEI Analytics Kit include First event attribution and Last event attribution. The First event attribution model attributes the success 100% to the first touch point that triggers the conversion path, but the Last event attribution model attributes the success 100% to the last touch point before sales or conversion.
Example:
Target conversion event A and to-be-attributed events B and C are determined, and the events are sorted by occurrence time as follows: B -> C -> A. If the First event attribution model is selected, the occurrence of event A is attributed to event B; if the Last event attribution model is selected, the occurrence of event A is attributed to event C.
2. How Do I Use Attribution Analysis?
On the Create attribution analysis report page, set the report parameters Name, Description, Attribution period, Target conversion event, To-be-attributed event (add 1 to 10 events), and Attribution model. Save the settings and you can view the attribution analysis report the next day.
Lots of good information, thank you!

HDC 2021: HUAWEI DTM Helps Developers Track Data Without Coding

From October 22 to 24, the HUAWEI DEVELOPER CONFERENCE 2021 (HDC.Together) was held in Songshan Lake, Dongguan. At the HMS Core 6.0: App Services technical session, the product executive of HUAWEI Dynamic Tag Manager (DTM) gave a speech on codeless tag management, and detailed the functions and advantages of DTM, attracting much attention from the audience.
As a tag management system, DTM can help developers flexibly manage data tracking tags for their apps without coding, empowering them to dynamically track specific events and report data to third-party analytics platforms with ease. Such a feature piqued the interests of many developers who attended the conference.
To explain how data is collected and reported without coding, let's look at the DTM service process in the figure above. DTM consists of a cloud portal and client. Developers can create a configuration file on the portal, which is then downloaded by the DTM SDK integrated into their apps. When a user clicks an ad or button in the app, the DTM SDK will collect, process, and send data based on the configuration file. The data can then be sent to HUAWEI Analytics or third-party analytics platforms as required. The configuration process is highly flexible, and even operations personnel with no coding experience can quickly create a configuration file on their own, reducing the workload of programmers.
During the HMS Core 6.0: App Services technical session, the product executive demonstrated how to use DTM with an online shopping app. When a user taps Add to Shopping Cart, the shopping app reports an event containing relevant data to a third-party analytics platform. To implement this feature, we can create a configuration file on DTM, which consists of three parts:
When to report data: This part determines when data will be reported, such as when a user taps the Add to Shopping Cart button.
What data to send: This part configures which data to be sent to the analytics platform, such as product name, color, and version.
Where data is sent to: This part specifies one or more analytics platforms to which the data is reported, for example, HUAWEI Analytics and HUAWEI Ads.
After such an event is generated, the DTM SDK will quickly collect and send the event to the specified analytics platforms based on the configuration file.
The DTM product executive also introduced another big advantage of DTM, which is visual event tracking. With visual event tracking, the native app or web app screen can be replicated on the DTM portal, allowing marketers and developers to directly add tracking events and parameters by clicking relevant elements on the portal page. This has the effect of considerably improving data collection efficiency.
DTM empowers developers to obtain and distribute data with ease by configuring rules or adding visual events.​
Efficient Ad Conversion Tracking with DTM
During the session, a product expert from HUAWEI Ads gave a presentation on how HUAWEI Ads and DTM work together to track ad conversions efficiently, and shared his experience of using DTM.
Figure: Presentation on how HUAWEI Ads and DTM work together to track ad conversions efficiently​
According to Huawei's statistical data, around 35% of web advertisers now use DTM to promote ad conversions, helping significantly reduce their workloads and improve efficiency. Before using DTM, web advertisers needed to add tracking code to individual web pages, and test and release the code, which is usually a time-consuming process. Following the adoption of DTM, web advertisers can now configure, test, and release tracking events using DTM, reducing the overall process time by 80%. In addition, when tracking events need to be changed, web advertisers can directly do so on the DTM portal without having to write additional code or release an app update, sharply shortening the development period. It comes as no surprise that event tracking with DTM is now the first choice for HUAWEI Ads web advertisers to track conversions on web pages.
Refined Operations with DTM
Figure: Huawei personnel explain DTM functions to developers​
DTM garnered much attention for itself at this year's HDC, thanks to its flexibility, efficiency, low cost, support for multiple platforms, and ability to provide mobile app and web page data tracking without coding. Ultimately, the key advantage of DTM is that it allows operations personnel to easily configure and modify rules for reporting events to various analytics platforms, which not only helps reduce development costs but also allows operations personnel to quickly obtain a wide range of data and adjust their operations strategies accordingly.
To learn more about DTM, please visit:
>> DTM official website
>> DTM development guide
>> DTM codelab
If you have any questions, submit a ticket online.
Thanks for sharing!

Analytics Kit 6.3.0: More Industries, More Reports

To provide you with a wealth of industry knowledge that helps digitalize your business, Analytics Kit 6.3.0 comes with reports on more industries.
Here's what's new:
l Added reports on four more industries, including securities, travel, language training, and exercise and health, as well as corresponding event tracking templates, for you to achieve precise operations.
l Added the page path analysis model, for you to quickly locate abnormal churn nodes.
l Added the function of viewing analysis reports using the AppGallery Connect app, for you to analyze data through a mobile device anytime and anywhere.
l Added SDKs for HarmonyOS and WeChat mini-programs, for you to analyze data in various scenarios.
l Added the event mapping capability to the intelligent data access function, for you to map custom events to predefined events.
Four More Industry Reports for Comprehensive Data Analysis
Analytics Kit 6.3.0 unlocks industry reports on securities, travel, exercise and health, and language training, which can be viewed through simple event tracking configuration using templates.
Securities industry analysis reports: They display your app's operations status from multiple aspects including data overview, trading, and news. By focusing on user experience and preferences, they can help you design marketing strategies for target users and scenarios.
Travel industry analysis reports: To help you boost the usage frequency and user stickiness of your app, they provide data indicators related to travel and hotel, so that you can offer one-stop services for a better user experience.
Exercise and health industry analysis reports: Consisting of data overview, payment analysis, behavior analysis, and community and after-sales data, they present comprehensive data to inform you of users' exercise habits and requirements, so that you can improve your app to enhance users' stickiness as well as willingness to pay, making your business unique and competitive.
Language training industry analysis reports: By displaying user preferences from various dimensions throughout the user lifecycle, they can help you identify what actions can be taken to drive business growth.
2. Page Path Analysis Model, for Key Insights into User Behavior
Analytics Kit 6.3.0 has added the page path analysis model, which takes each page as a conversion node. By focusing on abnormal pages with high churn rates, path analysis can deepen your understanding of user requirements for page redirection.
3. Data Analysis Reports at Your Service Anytime and Anywhere
You can view various data analysis reports through the AppGallery Connect app on mobile devices. As the data on mobile devices is synchronized with that on the web page, and displayed in a proper manner through adaptation, you can view data anytime and anywhere to detect abnormalities and formulate targeted plans.
4. SDKs for HarmonyOS and WeChat Mini-Programs, for Data Analysis on More Mobile Devices
By integrating the SDKs for HarmonyOS and WeChat mini-programs, you can analyze data for a range of scenarios. If your apps in the same project apply to multiple platforms, you can filter data by platform for a general overview of your project or detailed data of a specific app. You can also compare the user behavior of different platforms and apps with the comparison capability.
5. Event Mapping, Streamlining the Event Tracking Configuration
Intelligent data access has added the event mapping capability, allowing you to map custom events to predefined events of Analytics Kit, streamlining the event tracking configuration.
In addition, Analytics Kit 6.3.0 has optimized modules such as Event analysis, Audience analysis, and Intelligent data access, to support smoother data analysis.
To learn more about the updates, refer to the version change history. Click here to get the free trial for the demo, or visit our official website to access the development documents for Android, iOS, Web, Quick App, HarmonyOS, and WeChat Mini-Program.
Does it give domain-specific data?
Basavaraj.navi said:
Does it give domain-specific data?
Click to expand...
Click to collapse
Hi~
At present, we provide industry reports for different industries.Which domain-specific data are you referring to?

Categories

Resources