public interface FingerprintDevice extends Device
The fingerprint device object is obtained from the POSTerminal
, its' as follows:
FingerprintDevice fingerprintDevice = (FingerprintDevice) POSTerminal.getInstance().getDevice("cloudpos.device.fingerprint");Among them, the "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 |
FINGERPRINT
normal fingerprint
|
static int |
ISO_FINGERPRINT
ISO fingerprint
|
Modifier and Type | Method and Description |
---|---|
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[] |
listAllFingersStatus()
List all the fingerprints's status.
|
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
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.mode
- Communication mode to use.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 detected card 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
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