Integration of ZOLOZ HarmonyOS SDK
This document introduces the complete process of manually integrating the ZOLOZ HarmonyOS SDK.
Prerequisites
Before integrating the ZOLOZ HarmonyOS SDK, ensure that your DevEco Studio version is 5.0.5 or later.
Products supported
- RealID
- Face Capture
- ID Recognition
Procedures
Step 1: Download and Install SDK
Method 1: Install via command line from the third-party library repository
- Open the ZOLOZ HarmonyOS repository.
- Select the desired ZOLOZKit version (it is recommended to use the latest version).
- In the root directory of the Hap/Har that needs to be integrated, install the SDK using the following command.
copy
ohpm install @zoloz/zolozkit@<version\> Note:
<version>defaults to the latest version if omitted.- For more information on OpenHarmony ohpm environment setup and other details, please refer to OpenHarmony Third-Party Library Repository.
4. Verify installation.
After installation, the dependencies section in the on-package.json file at the root directory should display zolozkit.

Method 2: Manual download and installation
- Open the ZOLOZ HarmonyOS repository.
- Select the desired ZOLOZKit version (it is recommended to use the latest version), and download the corresponding
zolozkit.harpackage. - Drag the downloaded SDK file (.har) into the
libsdirectory of your project.

- Manually add the following dependency configuration in the
on-package.jsonfile at the root directory of your project.
copy
"dependencies": {
"zolozkit": "file:../zolozkit"
}
Step 2: Importing SDK into Main Project
Run the following codes to import SDK into main project.
copy
//import zoloz
import {ZolozFacade,ZolozRequest,ZolozResponse} from "@zoloz/zolozkit"
//use
const request = new ZolozRequest(clientCfg, { rsaPubKey });
const response= await ZolozFacade.getInstance().startWithRequest(getContext(this),request);
Verify Integration Result
Verify Har Integration
Add the following test codes, if the metainfo string is retrieved successfully, the SDK integration is confirmed.
copy
//import zoloz
import {ZolozFacade} from "@zoloz/zolozkit"
//Test calling ZolozFacade getMetaInfo
const metainfo = ZolozFacade.getMetaInfo()