How to Integrate Huawei HiAI Code Recognition in Android — part 1
In this article, we will learn integration of Huawei HiAI Code Recognition, It can identifies the QR codes and bar codes to obtain the contained information, based on which the service framework is provided. This API can be used to parse QR codes and bar codes in 11 scenarios including Wi-Fi and SMS, providing effective code detection and result-based service capabilities. This API can be widely used in apps that require code scanning services.
Introduction
In this article, we will learn integration of Huawei HiAI Code Recognition, It can identifies the QR codes and bar codes to obtain the contained information, based on which the service framework is provided. This API can be used to parse QR codes and bar codes in 11 scenarios including Wi-Fi and SMS, providing effective code detection and result-based service capabilities. This API can be widely used in apps that require code scanning services.
API Restrictions
- It supports limited devices, you can find the list of supported devices.
- It supports specific countries/regions, you can find the list of Supported Countries/Regions.
Prerequisites
- Must have a Huawei Developer Account.
- Must have a Huawei phone with HMS 4.0.0.300 or later.
- Must have a laptop or desktop with Android Studio, Jdk 1.8, SDK platform 26 and gradle 4.6 installed.
Integration steps
Step 1. Huawei developer account and complete identity verification in Huawei developer website, refer to register Huawei ID.
Step 2. Create a project in android studio, refer Creating an Android Studio Project.
Step 3. Create project in AppGallery Connect
Step 4. Navigate to this URL, choose App Service > Development and click HUAWEI HiAI.
Step 5: Click Apply for HUAWEI HiAI kit.
Step 6: Enter required information like Product and Package name, click Next button.
Step 7: Verify the application details and click Submit button.
Step 8. Click the Download SDK button to open the SDK list.
Step 9: Unzip downloaded SDK and add into your android project under libs folder.
Let’s start coding
Result
Tips and Tricks
- Make sure that Huawei account is verified.
- Enable Huawei HiAI service in the App Gallery.
- Make sure you have added the agconnect-services.json file in app folder.
- Make sure all the dependencies are added properly.
- Make sure proper images are added.
- Make sure that arr files are added in lib folder.
Conclusion
In this article, we have learnt that integration of Huawei HiAI Code Recognition, It can identifies the QR codes and bar codes to obtain the contained information, based on which the service framework is provided. This API can be widely used in apps that require code scanning services.
Thank you so much for reading, I hope this article helps you to understand the Huawei HiAI Code Recognition in android.
Reference