EKYC
1. Aadhaar e-KYC SDK Guide
1.1 Abstract
Aadhaar e-KYC SDK is a Aadhaar offline-eKYC XML downloading tool, which allows end users to fetch Aadhaar offline-eKYC XML file via UIDAI (Unique Identification Authority of India), and parses the XML file to fetch and to display various Aadhaar informations, including portait.
1.2 Introduction
Aadhaar offline-eKYC XML is a secure and sharable document which can be used by any Aadhaar card holder for offline verification and Identification. User is able to download Aadhaar offline-eKYC XML in form of Zip file from UIDAI(Unique Identification Authority of India). With user acknowlegement and approval, Aadhaar e-KYC SDK helps users to download the Aadhaar offline-eKYC XML Zip file in a faster and more convenient way. Corresponding flow as below:
- User inputs aadhaar number or VID.
- Aadhaar e-KYC SDK handles captcha verification and submits request to UIDAI.
- UIDAI then will send OTP to user’s Aadhaar registered phone number.
- User inputs received OTP code and share code.
- Aadhaar e-KYC SDK submits download request with user provided OTP code and share code to UIDAI to download Aadhaar offline-eKYC XML Zip file.
- Aadhaar e-KYC SDK then parses the downloaded Zip file and display Aadhaar information including portrait on the screen.
Tips:This service is only available for users who have bound mobile phone numbers to Aadhaar. For some users who are not bound mobile phone, it is recommended to use other authentication methods.
1.3 Process Flow
1.4 Current Version
e-KYC SDK current version is 2.0.2,the latest updated on Mar.13, 2020.
The size of SDK incremental compilation is 320KB.
The minimum supported OS version is Android 4.2.
2. SDK Integration
2.1 SDK Directory Structure
Below shows the structure of SDK directory:
- DFKYCDemo: the demo project
- DFKYCLibrary: contains the default SDK UI
- Doc: the document of SDK
2.2 Quick Integration
Before using the SDK, you need to integrate it into your development environment first.
Import DFKYCLibrary module to your project, File->New>import Module-> Select the DFKYCLibrary in DFKYCDemo folder -> Continuously click Next button to complete the import.
Add the following code in the dependencies{} section of build.gradle in your app module.
compile project(':DFKYCLibrary')
2.3 Launch e-KYC
Init API_ID and API_SECRET
DFKYCUtils.init(API_ID, API_SECRET);
Show e-KYC fragment
Place the following code to proper position of your module to launch e-KYC.
DFKYCFragment kycFragment = DFKYCFragment.getInstance();
kycFragment.setKYCCallback(new DFKYCCallback() {
@Override
public void onSuccess(DFKYCModel result) {
}
@Override
public void onError(DFErrorModel errorModel) {
}
@Override
public void onBack() {
}
});
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(containerViewId, fragment);
fragmentTransaction.commit();
Get SDK result
You can get SDK result by implementing DFKYCCallback interface.