This repository provide an example to help customer to integrate ZOLOZ SDK with ease.
- Android SDK and adb
git clone https://github.com/zoloz-pte-ltd/zoloz-demo-android
cd zoloz-demo-android
./gradlew :app:installDebug
-
Refer to this example to setup a minimum web server to act as your biz server bridging the demo app and the RealId service.
-
Open the application, fill the inbox of "HOST" with "http://lan_ip:lan_port"
- Click "START ZOLOZ" button to start the eKYC flow.
-
Add mavenCentral repository to your build.gradle:
mavenCentral()
-
In your module's (app-level) Gradle file (usually app/build.gradle), add Zoloz sdk as dependecy.
implementation "com.zoloz.android.build:zolozkit:${zolozKitVersion}" implementation "com.squareup.okio:okio:1.17.4@jar" implementation 'com.alibaba:fastjson:2.0.21.android'
-
Get meta info
String metaInfo = ZLZFacade.getMetaInfo(applicationContext);
-
Send the meta info to your biz server, and call RealId intialize API with meta info from your server to obtain the runtime configurations.
-
Construct
ZLZRequest
object withclientCfg
returned from RealId server:ZLZRequest request = new ZLZRequest(); request.bizConfig = new HashMap<>(); request.bizConfig.put(ZLZConstants.CONTEXT, this); request.bizConfig.put(ZLZConstants.LOCALE, locale); request.zlzConfig = clientCfg; return request;
-
Start the ZOLOZ SDK with
ZLZRequest
and you need to implement the callback functions to handle the eKYC outcome.ZLZFacade.getInstance().start(request, new IZLZCallback() { @Override public void onCompleted(ZLZResponse response) { } @Override public void onInterrupted(ZLZResponse response) { } });
The eKYC outcome only contains a simple code demostrating the status of the eKYC process, you have to call RealId checkResult API to get detailed information of the eKYC process.