The EkycID Android SDK lets you build a fantastic OCR and Face Recognition experience in your Android app.
With one quick scan, your users will be able to extract information from their identity cards, passports, driver licenses, license plates, vehicle registration, COVID-19 vaccination card, and any other government-issued document.
EkycID is:
- Easy to integrate into existing ecosystems and solutions through the use of SDKs that support both native and hybrid applications.
- Better for user experience because the document detection and liveness checks are done directly offline on the device.
- Great for cutting down operations costs and increasing efficiency by decreasing reliance on human labor and the time needed for manual data entry.
EkycID can:
- Extract information from identity documents through document recognition & OCR.
- Verify whether an individual is real or fake through liveness detection, and face recognition.
- Verify the authenticity of the identity documents by combining the power of document detection, OCR, liveness detection, and face recognition.
To see all of these features at work, download our free demo app:
- minSdkVersion: 21
- targetSdkVersion: 33
- compileSdkVersion: 33
Step 1: Add the JitPack repository to your root build.gradle at the end of repositories.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2: Add the dependency.
dependencies {
implementation 'com.github.EKYCSolutions:ekyc-id-android:1.0.21'
}
Step 1: Initialize Initializer
class and called initializer.start()
in onResume.
class MainActivity : AppCompatActivity() {
val initializer = Initializer(this)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
@RequiresApi(Build.VERSION_CODES.N)
override fun onResume() {
super.onResume()
// Start initializer here
initializer.start {
}
}
}
Step 2: Add DocumentScannerCameraView to your layout.xml
<com.ekycsolutions.ekycid.documentscanner.DocumentScannerCameraView
android:id="@+id/documentScannerCameraView
android:layout_width="match_parent"
android:layout_height="match_parent" />
Step 3: Initialize DocumentScannerCameraView
and implements DocumentScannerEventListener
.
class MainActivity : AppCompatActivity(), DocumentScannerEventListener {
val initializer = Initializer(this)
lateinit var documentScannerView: DocumentScannerCameraView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
@RequiresApi(Build.VERSION_CODES.N)
override fun onResume() {
super.onResume()
initializer.start {
runOnUiThread {
setContentView(R.layout.activity_main)
documentScannerView = findViewById(R.id.documentScannerView)
documentScannerView.addListener(this)
documentScannerView.setWhiteList(arrayListOf(ObjectDetectionObjectType.NATIONAL_ID_0.name))
documentScannerView.start()
}
}
}
override fun onInitialize() {
Log.d(TAG, "onInitialize")
}
override fun onFrame(frameStatus: FrameStatus) {
if (frameStatus != FrameStatus.PROCESSING) {
Log.d(TAG, "onFrame: $frameStatus")
}
}
override fun onDetection(detection: DocumentScannerResult) {
Log.d(TAG, "onDetection")
}
}
Step 1: Initialize Initializer
class and called initializer.start()
in onResume.
class MainActivity : AppCompatActivity() {
val initializer = Initializer(this)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
@RequiresApi(Build.VERSION_CODES.N)
override fun onResume() {
super.onResume()
// Start initializer here
initializer.start {
}
}
}
Step 2: Add DocumentScannerCameraView to your layout.xml
<com.ekycsolutions.ekycid.livenessDetection.LivenessDetectionCameraView
android:id="@+id/livenessDetectionCameraView
android:layout_width="match_parent"
android:layout_height="match_parent" />
Step 3: Initialize LivenessDetectionCameraView
and implements LivenessDetectionEventListener
.
class MainActivity : AppCompatActivity(), LivenessDetectionEventListener {
val initializer = Initializer(this)
lateinit var livenessDetectionCameraView: LivenessDetectionCameraView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
@RequiresApi(Build.VERSION_CODES.N)
override fun onResume() {
super.onResume()
initializer.start {
runOnUiThread {
setContentView(R.layout.activity_main)
livenessDetectionCameraView = findViewById(R.id.documentScannerView)
livenessDetectionCameraView.addListener(this)
livenessDetectionCameraView.setOptions(
LivenessDetectionOptions(
arrayListOf(LivenessPrompt.LOOK_LEFT, LivenessPrompt.LOOK_RIGHT, LivenessPrompt.BLINKING)
)
)
livenessDetectionCameraView.start()
}
}
}
override fun onInitialize() {
Log.d(TAG, "onInitialize")
}
override fun onFrame(frameStatus: FrameStatus) {
if (frameStatus != FrameStatus.PROCESSING) {
Log.d(TAG, "onFrame: $frameStatus")
}
}
override fun onPromptCompleted(completedPromptIndex: Int, success: Boolean: progress: Float) {
Log.d(TAG, "onPromptCompleted")
}
override fun onAllPromptsCompleted(detection: LivenessDetectionResult) {
Log.d(TAG, "onAllPromptsCompleted")
}
override fun onFocus() {
Log.d(TAG, "onFocus")
}
override fun onFocusDropped() {
Log.d(TAG, "onFocusDropped")
}
override fun onCountDownChanged(current: Int, max: Int) {
Log.d(TAG, "onCountDownChanged")
}
}
To perform face compare and ocr, you can call your server that integrated with our NodeSDK to get face compare score and ocr response respectively.
For any other questions, feel free to contact us at ekycsolutions.com
© 2022 EKYC Solutions Co, Ltd. All rights reserved.