Grabba Driver for Android
Unified driver for Grabba devices on the Android operating system
FingerprintAPI Class Reference

Description

Provides access to Grabba fingerprint reader functionality, such as capturing fingerprints.

Fingerprint database functionality will be added in a future driver release, but is not supported at present.

Callbacks to user-provided code may be triggered in response to relevant events, e.g. successful enrolment of a fingerprint. Refer to the FingerprintListener class for the details of these callbacks and how to enable them.

Calls to this class will not succeed until a connection to a Grabba device has been established. Refer to the CoreAPI class for details of how to establish or query this connection.

Thread safety: Everything in this namespace is fully thread-safe.

Note
This class has no non-static methods or data; consequently, object creation is disabled.

Static Public Member Functions

static void abort (boolean blocking)
 Abort any asynchronous operations which are currently in progress. More...
 
static void capture (@NonNull FingerprintTemplate.TypeID templateType, @NonNull FingerprintImage.TypeID imageType, boolean repeatCapture, @NonNull ErrorCode error)
 Attempt to capture a fingerprint. More...
 
static boolean supported ()
 Query whether there is currently a connected Grabba device with fingerprint functionality. More...
 
static boolean V1CompressionSupported ()
 Query whether there is currently a connected Grabba device with V1 compression support. More...
 
static void verify (@NonNull byte[] data, @NonNull FingerprintTemplate.TypeID templateType, @NonNull ErrorCode error)
 Attempt to capture a fingerprint, then verify it against a given template. More...
 
static boolean WSQ_CompressionSupported ()
 Query whether there is currently a connected Grabba device with WSQ compression support. More...
 

Member Function Documentation

◆ abort()

static void abort ( boolean  blocking)
static

Abort any asynchronous operations which are currently in progress.

If a capture() or verify() operation is currently in progress, then it will be aborted. If no such operations are currently active then this call will have no effect.

This operation may be performed either synchronously or asynchronously:

  • Synchronous mode: This call will block until any ongoing fingerprint reader operations have been aborted.
  • Asynchronous mode: This call is non-blocking; it will signal ongoing processes but not wait for them to abort.

The asynchronous mode does not guarantee immediate termination; it is still possible for an operation which had nearly completed to finish a short time after abort() is called.

Parameters
blockingIf set, this operation will run synchronously (blocking until complete); otherwise, it will run asynchronously

◆ capture()

static void capture ( @NonNull FingerprintTemplate.TypeID  templateType,
@NonNull FingerprintImage.TypeID  imageType,
boolean  repeatCapture,
@NonNull ErrorCode  error 
)
static

Attempt to capture a fingerprint.

If the supplied error code indicates no prior errors, then an attempt will be made to capture a fingerprint. This operation will occur asynchronously; only error conditions which can be detected immediately (e.g. lack of hardware support) will be returned by this function.

If the capture starts, then the returned error code will be set to NO_ERROR; results are provided as callbacks to FingerprintListener objects. Note that only one image/template callback will be provided; if the repeatCapture parameter is set true, then the template returned will be a consolidation of the three captures, and the image returned will be that of the third (last) capture.

Once captured, the fingerprint may subsequently be used with the verify() function.

Parameters
templateTypeThe type of fingerprint template to pass to the listener object(s) after enrolment
imageTypeThe type of fingerprint image to pass to the listener object(s) after enrolment
repeatCaptureIf true, each print is captured three times, otherwise it is only captured once. Notes:
  • If only an image is required, then a single acquisition may suffice, particularly if the user can be notified of the quality (or lack thereof)
  • If a capture is being performed for the purpose of verification, then a single capture is likely to suffice
  • If a template is being captured for the purpose of database enrolment, then it is often preferable to obtain three captures, since the template is a consolidation of multiple reads of the same print
errorError code; operation proceeds only if set to NO_ERROR. If an error is detected when starting the operation, then this will be updated with the details.

◆ supported()

static boolean supported ( )
static

Query whether there is currently a connected Grabba device with fingerprint functionality.

This is a non-blocking call; device capabilities are cached internally by the driver.

Returns
True if there is a connected Grabba device and that device supports fingerprint functionality; false otherwise.

◆ V1CompressionSupported()

static boolean V1CompressionSupported ( )
static

Query whether there is currently a connected Grabba device with V1 compression support.

This is a non-blocking call; device capabilities are cached internally by the driver.

Note that this can only return true when supported() also returns true; however, not all Grabba devices with fingerprint readers have V1 compression support.

Returns
True if there is a connected Grabba device and that device supports fingerprint images with V1 compression; false otherwise.

◆ verify()

static void verify ( @NonNull byte []  data,
@NonNull FingerprintTemplate.TypeID  templateType,
@NonNull ErrorCode  error 
)
static

Attempt to capture a fingerprint, then verify it against a given template.

If the supplied error code indicates no prior errors, then an attempt will be made to capture a fingerprint, and if successful then verify it against the given template. This operation will occur asynchronously; only error conditions which can be detected immediately (e.g. lack of hardware support) will be returned by this function.

If the capture starts, then the returned error code will be set to NO_ERROR; results are provided as callbacks to FingerprintListener objects.

Typically this function is used in conjunction with capture(), which can generate templates to verify against.

Parameters
dataTemplate data for comparison
templateTypeType of templateData
errorError code; operation proceeds only if set to NO_ERROR. If an error is detected when starting the operation, then this will be updated with the details.

◆ WSQ_CompressionSupported()

static boolean WSQ_CompressionSupported ( )
static

Query whether there is currently a connected Grabba device with WSQ compression support.

This is a non-blocking call; device capabilities are cached internally by the driver.

Note that this can only return true when supported() also returns true; however, not all Grabba devices with fingerprint readers have WSQ compression support.

Returns
True if there is a connected Grabba device and that device supports fingerprint images with WSQ compression; false otherwise.