0% found this document useful (0 votes)
63 views

Fingerprint SDK Interface Documentation: 1.1 Initialize

The fingerprint SDK interface documentation provides functions for initializing, closing, capturing, enrolling, authenticating, and removing fingerprints. It includes method names, descriptions, parameters, return values, and notes. Callback interfaces return enrollment progress, authentication results, and image and feature data. Return codes indicate success or error conditions like timeouts, data errors, and fingerprint detection or extraction failures.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Fingerprint SDK Interface Documentation: 1.1 Initialize

The fingerprint SDK interface documentation provides functions for initializing, closing, capturing, enrolling, authenticating, and removing fingerprints. It includes method names, descriptions, parameters, return values, and notes. Callback interfaces return enrollment progress, authentication results, and image and feature data. Return codes indicate success or error conditions like timeouts, data errors, and fingerprint detection or extraction failures.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Fingerprint SDK interface documentation

1 Fingerprint module

The fingerprint module is responsible for providing functions such as opening, closing, fingerprinting, verification, and
deletion of the fingerprint module.
Get the object of the FingerprintManager class:

FingerprintManager fingerprintManger = FingerprintManager.getInstance ();

1.1 Initialize

Method name public boolean init()

1
Describe Initialize
Input parameters
Output parameters
Return boolean true Success,false fail
Data structure
Note
Example

1.2 Close

Method name public boolean close()


Describe Fingerprint is closed and resources are released
Input parameters
Output parameters
Return boolean true Success,false fail
Data structure
Note
Example

1.3 Capture

Method name public void capture(int timeout)


Describe Capture
Input parameters timeout Timeout, in seconds (range 0~50)
Output parameters
Return
Data structure
Note Get the image data in the onGetImageFeature() callback
Example

1.4 Capture feature

Method name public void captureAndGetFeature(int timeout)

2
Describe Capture current fingerprint image features
Input parameters timeout Timeout, in seconds (range 0~50)
Output parameters
Return
Data structure
Note Get the data in the onGetImageFeature () callback
Example

1.5 Capture ISO feature

Method name public void captureAndGetFeature(int timeout)


Describe Capture current fingerprint image features as ISO format
Input parameters timeout Timeout, in seconds (range 0~50)
Output parameters
Return
Data structure
Note Get the data in the onGetImageISOFeature () callback
Example

1.6 Enrollment

Method name public void enrollment(int fingerId, int count, int timeout)
Describe Collect fingerprint image features three times to complete user

fingerprint information registration


Input parameters fingerId Fingerprint id
count To complete a fingerprint template

registration, you need to press it

three times, in the order of 1-2-3.


timeout Timeout, in seconds (range 0~50)
Output parameters
Return
Data structure
Note Get the enrollment result in onEnrollmentProgress()

callback
Example

3
1.7 Authenticate

Method name public void authenticate(int timeout)


Describe Obtain the currently pressed finger fingerprint feature and the

fingerprint library template for 1:N search comparison


Input parameters timeout Timeout, in seconds (range 0~50)
Output parameters
Return
Data structure
Note The result in onAuthenticationSucceeded() and

onAuthenticationFailed()
Example

1.8 Authenticate

Method name public void authenticate(int fingerId, int timeout)


Describe Get the 1:1 comparison between the currently pressed finger

fingerprint feature and the specified template in the fingerprint

library.
Input parameters fingerId Fingerprint id
timeout Timeout, in seconds (range 0~50)
Output parameters
Return
Data structure
Note The result in onAuthenticationSucceeded() and

onAuthenticationFailed()
Example

4
1.9 Remove fingerprint

Method name public int remove(int fingerid)


Describe Remove enrolled fingerprint by id
Input parameters fingerId Fingerprint id
Output parameters
Return
Data structure
Note
Example

1.10 Remove all

Method name public int removeAll()


Describe Remove all enrolled fingerprint
Input parameters
Output parameters
Return
Data structure
Note
Example

1.11 Get enrolled fingerprint count

Method name public Result getEnrolledCount()


Describe Get the number of fingerprint library fingerprint registrations
Input parameters
Output parameters
Return Result Result.error: status code
Result.arg1: enrolled count
Data structure public class Result {
public final int error;
public final int arg1;
public final int arg2;
public final Object data;

5
}
Note
Example

1.12 Get the list of enrolled fingerprint id

Method name public Result getEnrolledFingerprints()


Describe Get the list of enrolled IDs in the device fingerprint library
Input parameters
Output parameters
Return Result Result.error: status
Result.data: the list of ids
Data structure public class Result {
public final int error;
public final int arg1;
public final int arg2;
public final Object data;

}
Note
Example

1.13 Generate a Bitmap and store it to the specified path

Method name public Bitmap generateBmp(byte[] buffer, String path)


Describe Generate a Bitmap and store it to the specified path
Input parameters buffer Bitmap
path Picture storage path
Output parameters
Return Bitmap Bitmap object in memory
Data structure
Note Fingerprint images can be saved in the onGetImageComplete callback
Example

6
1.14 Add listener

Method name public void addFignerprintListener(FingerprintListener listener)


Describe Add listener
Input parameters listener See detail 3.14.6

Output parameters
Return
Data structure

Note
Example

1.15 Remove listener

Method name public void removeFignerprintListener(FingerprintListener listener)


Describe Remove listener
Input parameters listener See detail 3.14.6

Output parameters
Return
Data structure

Note
Example

2 Callback interface FingerprintListener

public interface FingerprintListener {


/**
* Fingerprint entry progress
*
* @param fingerId Fingerprint ID
* @param remaining Indicates that this finger entry is completed and needs to
be entered a few more times (currently, one finger needs to be entered 3times to
complete)
* @param reason Status

7
*/
public void onEnrollmentProgress(int fingerId, int remaining, int reason);

/**
* Fingerprint auth failed
*
* @param reason
*/
public void onAuthenticationFailed(int reason);

/**
* Fingerprint auth succeeded
*
* @param fingerId Fingerprint Id
* @param result
*/
public void onAuthenticationSucceeded(int fingerId, Object obj);

/**
* Get fingerprint image
*/
public void onGetImageComplete(String result, byte[] imgBuff);

/**
* Get fingerprint feature
*
* @param result
* @param feature
*/
public void onGetImageFeature(int result, byte[] feature);

/**
* Get fingerprint ISO features
*
* @param result
* @param feature
*/
public void onGetImageISOFeature(int result, byte[] feature);
}

8
3 Returns code information

3.1 Returns code information

public static final int SDK_OK = 0; //Success


public static final int SDK_ERROR = -1001; //Fail
public static final int SDK_PARAMERR = -1002; //Param error
public static final int SDK_TIMEOUT = -1003; //Timeout
public static final int SDK_RECV_DATA_ERROR = -1004; //Receive data error

3.2 FingerResult

public static final int RESULT_OK = 0x00;


public static final int TRANSFER_ERROR = 0x01;
public static final int NO_FINGER_DETECTED = 0x02;
public static final int ENCROLL_FAILED = 0x03;
public static final int DRY_AND_LIGHT_IMAGE = 0x04;
public static final int WET_AND_SLOPPY_IMAGE = 0x05;
public static final int MESSY_IMAGE = 0x06;
public static final int FAILD_EXTRACT_MINITIAE = 0x07;
public static final int VERIFY_NOT_MATCH = 0x08;
public static final int IDENTIFY_NOT_FIND = 0x09;
public static final int FEATURE_MERGE_FAILED = 0x0A;
public static final int FINGER_ID_OUT_OF_BOUND = 0x0B;
public static final int TEMPLATE_TRANSFER_INVALID = 0x0C;
public static final int UPLOAD_FETURE_FAILED = 0x0D;
public static final int RECV_REMAIN_DATA_ERROR = 0x0E;
public static final int DELETE_TEMPLATE_FAILED = 0x10;
public static final int EMPTY_TEMPLATE_FAILED = 0x11;
public static final int NO_VALID_IAMGE = 0x15;
public static final int FLASH_OPT_FAILED = 0x18;
public static final int INVALID_REGISTER_NUM = 0x1A;
public static final int REGISTER_SETTING_ERROR_NUM = 0x1B;
public static final int TEMPLATE_IS_EMPTY = 0x27;
public static final int WRONG_OPT_SEQUENCE = 0x30;
public static final int TEMPLATE_NUM_ERROR = 0x31;
public static final int NO_TEMPLATE_ID = 0x32;
public static final int WRONG_LOCATION_ERROR = 0x33;

9
public static final int UNKNOWN_ERROR = 0x19;
public static final int GET_IMAGE_TIMEOUT = 0x1C;
public static final int CHECK_VALUE_ERROR = 0x1D;
public static final int NO_PERMISSION = 0xFE;
public static final int NO_SUPPORTED_CMD = 0xFF;

10

You might also like