public interface FingerprintDevice extends Device
The fingerprint device object is obtained from the POSTerminal
, its' as follows:
FingerprintDevice fingerprintDevice = (FingerprintDevice) POSTerminal.getInstance().getDevice("com.cloudpos.device.fingerprint");Among them, the "com.cloudpos.device.fingerprint" string is to identify the fingerprint device, defined by the specific implementation.
Uses the fingerprint device object to control the operation of the fingerprint device.
An app can request permission to access the device, as shown below:
<uses-permission android:name="android.permission.CLOUDPOS_FINGERPRINT"/>
Device
Modifier and Type | Field and Description |
---|---|
static int |
ANSI_FINGERPRINT
ANSI fingerprint
|
static int |
FINGERPRINT
normal fingerprint
|
static int |
ISO_FINGERPRINT
ISO fingerprint
|
Modifier and Type | Method and Description |
---|---|
int |
compare(byte[] arryISObuffer1,
byte[] arryISObuffer2)
Compares two fingerprint datas.
|
int |
compareByFormat(byte[] arryBuffer1,
int format1,
byte[] arryBuffer2,
int format2)
Compares two fingerprint datas by format.
|
byte[] |
convertFormat(byte[] dataBuffer,
int srcFormat,
int outFormat)
Convert formatted buffers to ISO 2005 format
|
int |
convertFormat(Fingerprint fingerprintIn,
int typeIn,
Fingerprint fingerprintOut,
int typeOut)
Convert fingerprint from one type to another.
|
int |
delAllFingers()
Delete all fingerprints.
|
int |
delFinger(int userID)
Delete one fingerprint.
|
int |
enroll(int userID,
int timeout)
Enroll fingerprint.
|
Fingerprint |
getFingerprint(int type)
Get the active fingerprint, specified the type of the fingerprint.
|
Fingerprint |
getFingerprint(int userID,
int type)
Get the specified fingerprint.
|
int |
getId()
Get the id of fingerprint.
|
int[] |
identify(byte[] targetISObuffer,
java.util.List arryISObuffers,
int candidatesRequested)
Compares a single fingerprint to an array of fingerprints.
|
int[] |
listAllFingersStatus()
List all the fingerprints's status.
|
void |
listenForEnroll(OperationListener listener,
int timeout)
Starts enroll the finger print.
|
void |
listenForFingerprint(OperationListener listener,
int timeout)
Starts scan the finger print.
|
int |
match(Fingerprint fingerprint1,
Fingerprint fingerprint2)
Matches the two finger print.
|
void |
open(int logicalID)
Opens the device with a specific communication mode.
|
int |
storeFeature(int userID,
Fingerprint fingerprint)
Store the fingerprint.
|
int |
verifyAgainstFingerprint(Fingerprint fingerprint,
int timeout)
Verify the active fingerprint against the the specified fingerprint.
|
int |
verifyAgainstUserId(int userID,
int timeout)
Verify the active fingerprint against the the specified user id.
|
int |
verifyAll(int timeout)
Verify the active fingerprint.
|
FingerprintOperationResult |
waitForFingerprint(int timeout)
This is the synchronous method of the
listenForFingerprint(OperationListener,int) . |
cancelRequest, close, getFailCount, getUsageCount, open
static final int FINGERPRINT
static final int ISO_FINGERPRINT
static final int ANSI_FINGERPRINT
void open(int logicalID) throws DeviceException
Resets the state of the initiator if it has previously been opened.
logicalID
- logical ID of the device to open. logicalID = FINGERPRINT
or ISO_FINGERPRINT
or ANSI_FINGERPRINT
.DeviceException
- for the standard reasons that are documented in
DeviceException
.void listenForFingerprint(OperationListener listener, int timeout) throws DeviceException
This is an asynchronous method.
handleResult()
will be invoked when captured the finger print.
Information about successfully got fingerprint can be retrieved by the
getFingerprint(int,int)
function.
Because this method uses a timeout parameter, the device receiving this request MUST be able to
successfully respond to cancelRequest()
and abort the operation.
In case of a timeout occurring, the operation result will contain code=
ERR_TIMEOUT
, and no information about
card will be available.
listener
- operation listener.timeout
- the maximum scanning time of the method, in milliseconds.DeviceException
- for the standard reasons that are documented in
DeviceException
FingerprintOperationResult waitForFingerprint(int timeout) throws DeviceException
listenForFingerprint(OperationListener,int)
.timeout
- the maximum scanning time of the method, in milliseconds.DeviceException
- for the standard reasons that are documented in
DeviceException
int match(Fingerprint fingerprint1, Fingerprint fingerprint2) throws DeviceException
fingerprint1
- fingerprint2DeviceException
- for the standard reasons that are documented in
DeviceException
void listenForEnroll(OperationListener listener, int timeout) throws DeviceException
This is an asynchronous method.
handleResult()
will be invoked when captured the finger print.
The interaction information when enroll can be retrieved by the
getEnrollInfo()
function or
getEnrollInfo()
function or
getEnrollInfo()
function.
Information about successfully enrolled fingerprint can be retrieved by the
getFingerprint(int,int)
function.
This enroll process need interaction, please follow the different operation result to press or remove fingerprint, only the last time can get fingerprint.>
Because this method uses a timeout parameter, the device receiving this request MUST be able to
successfully respond to cancelRequest()
and abort the operation.
In case of a timeout occurring, the operation result will contain code=
ERR_TIMEOUT
.
listener
- operation listener.timeout
- the maximum scanning time of the method, in milliseconds.DeviceException
- for the standard reasons that are documented in
DeviceException
int enroll(int userID, int timeout) throws DeviceException
userID:
- user id, set to -1, the value will genrated by the driver.(1 <= user id <= 100 )timeout:
- time out, unit is msDeviceException
int verifyAll(int timeout) throws DeviceException
timeout:
- time out, unit is msDeviceException
int delAllFingers() throws DeviceException
DeviceException
int delFinger(int userID) throws DeviceException
userID:
- user idDeviceException
int verifyAgainstUserId(int userID, int timeout) throws DeviceException
userID:
- user idtimeout:
- time out, unit is msDeviceException
int verifyAgainstFingerprint(Fingerprint fingerprint, int timeout) throws DeviceException
fingerprint:
- The specified fingerprinttimeout:
- time out, unit is msDeviceException
int[] listAllFingersStatus() throws DeviceException
DeviceException
Fingerprint getFingerprint(int userID, int type) throws DeviceException
userID:
- user idtype:
- fingerprint type, 0: Defautl, 1:ISO2005, 2:ISO2015DeviceException
int storeFeature(int userID, Fingerprint fingerprint) throws DeviceException
userID:
- user id, set to -1, the value will genrated by the driver.fingerprint:
- The fingerprint to storeDeviceException
Fingerprint getFingerprint(int type) throws DeviceException
type:
- fingerprint type, 0: Defautl, 1:ISO2005, 2:ISO2015DeviceException
int convertFormat(Fingerprint fingerprintIn, int typeIn, Fingerprint fingerprintOut, int typeOut) throws DeviceException
fingerprintIn:
- The fingerprint before converttypeIn:
- The type of the fingerprint before convert, 0: Defautl, 1:ISO2005, 2:ISO2015fingerprintOut:
- The fingerprint after converttypeOut:
- The type of the fingerprint after convert, 0: Defautl, 1:ISO2005, 2:ISO2015DeviceException
int getId() throws DeviceException
DeviceException
int compare(byte[] arryISObuffer1, byte[] arryISObuffer2) throws RemoteException, DeviceException
arryISObuffer1
- : the byte buffer of the first Fingerprint Minutiae DataarryISObuffer2
- : the byte buffer of the second Fingerprint Minutiae DataRemoteException
DeviceException
int[] identify(byte[] targetISObuffer, java.util.List arryISObuffers, int candidatesRequested) throws RemoteException, DeviceException
targetISObuffer
- : the target ISO bufferlistISObuffer
- : The list of the candidates ISO buffer to be searched in.candidatesRequested
- :How many candidates to return.RemoteException
DeviceException
byte[] convertFormat(byte[] dataBuffer, int srcFormat, int outFormat) throws RemoteException, DeviceException
dataBuffer:
- A single target format's buffersrcFormat:0:ISO
- IEC 19794-2-2005 Fingerprint Minutiae Data format
1:ANSI INSITS 378-2004 Fingerprint Minutiae Data formatoutFormat:
- RemoteException
DeviceException
int compareByFormat(byte[] arryBuffer1, int format1, byte[] arryBuffer2, int format2) throws RemoteException, DeviceException
arryBuffer1
- : the byte buffer of the first Fingerprint Minutiae Dataformat1
- : the arryBuffer1's format
0:ISO IEC 19794-2-2005 Fingerprint Minutiae Data format
1:ANSI INSITS 378-2004 Fingerprint Minutiae Data formatarryBuffer1
- : the byte buffer of the second Fingerprint Minutiae Dataformat1
- : the arryBuffer2's format
0:ISO IEC 19794-2-2005 Fingerprint Minutiae Data format
1:ANSI INSITS 378-2004 Fingerprint Minutiae Data formatRemoteException
DeviceException