Android
BCC Finger is an Android library meant to be integrated into an Android application. Essentially, it will open a camera and capture fingerprints for biometric purposes.
This Manual is updated for BCC Finger Photo Android version 4.3.0.
Requirements
BCC Finger Photo is an Android library and must be imported into the target project.
Minimum Android Version: Android 6.0 (SDK 23), "Marshmallow".
Minimum kotlin version: 1.6.0.
Mobile device must have a camera.
Native app must be built with Android technology.
Development environment: An Android IDE is required, such as Android Studio (recommended)
Additional external dependencies:
Lottie, version 3.0.0
Installation
Adding the Library in the App Project
The BCC Finger Photo library requires JNA for Android. Both are provided by Griaule as .aar files.
To add the libraries, go to your project directory, open the app folder and create the following directories libs/bccfinger. Then, add the jna.aar and the bccfingerphotolib-release.aar dependencies. The folder structure must be similar to this:

The next step is to make these files visible to the gradle dependencies. To do this, add the following line in the file build.gradle (:app) in the dependencies object:
Inside the build.gradle (:app) file, also add the compile options and set set Source Compatibility and Target Compatibility to use 1.8 (Java 8):
Setting All Dependencies
Make the changes below to the file android/app/build.gradle:
Usage
Parameters and Constructor
A simple library usage example is shown below:
The BCCFingerBuilder class takes the following parameters:
context: Context- The application context.delegate: BCCFingerDelegate- Interface responsible for notifying capture events (e.g. failure or success).
The BCCFingerBuilder class is responsible for handling the usage configuration for BCCFinger. The following parameters are accepted for configuring biometric capture and software behaviour:
setSkipCaptureOption(enable: Boolean)- Enables the option to skip the current capture.setDebugMode(enable: Boolean)- Enables debug mode.buildCaptureType(type: BCCFingerPhotoCaptureType)- Defines the fingerprint capture type. The options are:BOTH_HANDS- Both hands without thumbs.ONLY_LEFT_HAND- Left hand only, without thumbs.ONLY_RIGHT_HAND- Right hand only, without thumbs.THUMBS- Both thumbs.LEFT_THUMB- Left thumb only.RIGHT_THUMB- Right thumb only.FULL_HANDS- Both hands with thumbs.FULL_LEFT_HAND- Left hand only, with thumb.FULL_RIGHT_HAND- Right hand only, with thumb.
buildBeginDelaySeconds(delay: Float)- Defines the delay to start threshold auto adjustment.buildThreshold- Defines threshold parameters.
For reference, the full list of parameters and default values is:
Return Values
The results from the last fingerprint capture can be retrieved through the fingerCaptureDidFinish method from the BCCFingerDelegate interface:
The returnData object contains the following methods for data retrieval:
getCapturedFingersIndexes()- Returns a list with the index of all captured fingerprints:getCapturedFingers()- Returns a map that relates the finger indexes to the captured biometrics.getCapturedFingersData()- Returns the list of all fingerprints captured:fingerprintImage- PNG image of the fingerprint in grayscale.wsqAsBase64- base64 encoded WSQ image of the fingerprint.
getSkippedFingers()- Returns the index list of all skipped finger captures.
The BCCFingerReturnData class also contains attributes that store the capture information grouped by hand:
These attributes can be null whenever captures are not requested for any of the hands.
The HandData class contains the following information:
capturedFingers- Map that relates the finger index to the fingerprint image.skippedFingers- Index list of all skipped finger captures.handsPhoto- Original photo of the hand from which the fingerprints were extracted.thumbPhoto- Original photo of the thumb.
If the user aborts the capture, closing before capturing the biometrics, the method fingerCaptureDidAbort will be called. You can implement this method to treat this scenario.
Retrieving Original Images
It is possible to get the original images through the BCCFingerReturnData class, as shown below:
Sample Project
This is a functional sample project for a fingerprint capture using BCC Mobile Finger Android:
Last updated
Was this helpful?

