API Reference
setActivation
public static native int setActivation(String var0);
Name
setActivation
Description
Activate SDK
Input
var0 (String): The license string
Output
The SDK activation status code.
0: Success
Non-zero: Activation failed
init
public static native int init(ContextWrapper var0);
Name
init
Description
Initiate SDK
Input
var0 (ContextWrapper ): An instance to access application assets
Output
The SDK initialization status code.
0: Success
-1: License Key Error
-2: License AppID Error
-3: License Expired
-4: Activate Error
-5: Initialize SDK Error
yuv2Bitmap
public static native Bitmap yuv2Bitmap(byte[] var0, int var1, int var2, int var3);
Name
yuv2Bitmap
Description
Convert YUV camera frame to Bitmap image
Input
var0 (byte[]): Byte array representing the YUV image data in NV21 format
var1 (int): Width of the image
var2 (int): Height of the image
var3 (int): Orientation of the image
1 -> No processing 2 -> Flip horizontally 3 -> Flip horizontally first and then flip vertically 4 -> Vertical flip 5 -> Transpose 6 -> Rotate 90° clockwise 7 -> Horizontal and vertical flip --> Transpose 8 -> Rotate 90° counterclockwise
Output
A Bitmap object representing the converted image
idcardRecognition
public static native String idcardRecognition(Bitmap var0);
Name
idcardRecognition
Description
Extract data from ID Document
Input
var0 (Bitmap): The Bitmap image
Output
A string representing the extracted data.
Output Example for idcardRecognition
{
"Document Number":"963545627",
"Nationality":"USA",
"Date of Issue":"2017-04-14",
"Document Class Code":"P",
"Issuing State Code":"USA",
"Full Name":"JOHN DOE",
"Date of Birth":"1996-03-15",
"Sex":"M",
"Date of Expiry":"2027-04-14",
"Surname":"JOHN",
"Given Names":"DOE",
"Issuing State Name":"United States",
"Authority":"United States,Department of State",
"Place of Birth":"CALIFORNIA, U.S.A",
"Document Name":"Passport",
"Quality":99,
"Position": {
"x1":24,"y1":4294967295,"x2":577,"y2":381
},
"MRZ": {
"Document Number":"963545637",
"MRZ":"P<USAJOHN<<DOE<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,9635456374USA9603150M2704140202113962<804330",
"Document Class Code":"P",
"Issuing State Code":"USA",
"Full Name":"JOHN DOE",
"Nationality Code":"USA",
"Date of Birth":"1996-03-15",
"Sex":"M",
"Date of Expiry":"2027-04-14",
"Surname":"JOHN",
"Given Names":"DOE",
"Issuing State Name":"United States",
"MRZ Type":"ID-3",
"Validation":1
},
"Images":{
"Portrait":"/9j/4AAQSkZJRgABAQEAxwDH....KUr2P//Z",
"Document":"/9j/4AAQSkZJRgABAQEAxwDH....o/Dd8yZC"
}
}
Last updated