let readingConfig =UQReadingConfig()readingConfig.enableReading =truereadingConfig.faceMinimumMatchLevel =3readingConfig.forceReading(false)readingConfig.forceReadingTimeout(-1)
See the options described below:
Facial Recognition Configuration
In order to check if the document type supports facial recognition you can use the following method:
The Uqudo SDK will throw certain exceptions which need to be handled by the application. The Exceptions are:
IllegalStateException - e.g. enabling the "Lookup Flow" for a document that doesn’t support it or because facial recognition is enabled and the documcent doesn't support it or because of some required configuration missing
UnsupportedDeviceException - e.g. the device is rooted
Handling the Result
The enrollment result will be available to the builder delegate (the class that initiates the SDK has to extends UQBuilderControllerDelegate) if the operation succeeds and you get the result with the following method. See "SDK result" for the details about the JWS string:
UNEXPECTED_ERROR = Something went wrong. In the message the details of the error
SESSION_INVALIDATED_CHIP_VALIDATION_FAILED = Session gets invalidated because the CHIP validation of the card fails, and the reading step is forced by configuration
SESSION_INVALIDATED_READING_NOT_SUPPORTED = Session gets invalidated because the document doesn’t support reading (e.g. no chip available) and the reading step is forced by configuration
SESSION_INVALIDATED_FACE_RECOGNITION_TOO_MANY_ATTEMPTS = Session gets invalidated because of too many failed facial recognition attempts
SESSION_INVALIDATED_CAMERA_NOT_AVAILABLE = Session gets invalidated because the camera is not available
SESSION_INVALIDATED_CAMERA_PERMISSION_NOT_GRANTED = Session gets invalidated because camera the end user denies camera access
statusTask contains the following codes:
SCAN = The scanning task
READING = The NFC reading task
FACE = The facial recognition task
BACKGROUND_CHECK = The background check task (only if skipView() is not enabled)
message contains the details of the status code
data as String that contains the JWS object with the partial data of an incomplete KYC session. Returning the partial data for an incomplete KYC session is disabled by default, please see Enrollment Builder Configuration for details.
Nonce provided by the customer mobile application when the SDK is initiated. It is useful to make sure the process has been initiated by the customer mobile application. It should be generated server side.
setSessionID(sessionId)
String
(UUID v4)
Yes
Auto generated
Required during the enrolment process using a QR code, see QR code App.
Note: make sure to create always a new session id when you trigger the SDK flow
When enabled, if the user or the SDK drops the session before completion, the SDK will return the partial data together with the SessionStatus object (see Session Status Handling). Please note that you can expect some data only if the user passes at least the scanning step
setAppearanceMode
AppearanceMode
No
SYSTEM
Set the appearance mode for the SDK. The following options are available:
SYSTEM: the SDK checks the OS setting for light or dark mode
LIGHT: force the light mode
DARK: force the dark mode
enableLookup()
None
Yes
None
Enable third party lookup (Government database). See the supported documents and the data returned in Lookup Object
Note: this feature requires an additional permission and must be explicitly requested
enableLookup(documentTypes)
Array of document types
Yes
None
Enable third party lookup (Government database) filtered by document type. For instance, if your KYC process includes more than one document, you can decide to perform the lookup only for one single document. See the supported documents and the data returned in in Lookup Object
Note: this feature requires an additional permission and must be explicitly requested
allowNonPhysicalDocuments
Boolean
Yes
false
If enabled allows scanning of non-physical documents (where the SDK doesn't reject scans upon detecting a screen)
Note: Available only on SDK version 3.x and above
disableTamperingRejection
Boolean
Yes
false
If enabled directs the SDK not to dismiss the scan upon detecting tampering, specifically for ID photo tampering detection.
Note: Available only on SDK version 3.x and above
disableExpiryValidation
Boolean
Yes
false
Allows to scan expired documents
enableAgeVerification
Int
Yes
-1 (disabled)
Enable age verification. If the age calculated from the document is not above or equals the defined age, the scan fails showing a message to the user accordingly. Age must be above 0 otherwise is not taken into consideration
Defines the minimum match level that the facial recognition has to meet for scanned picture of this specific document
enableScanReview(frontSide, backSide)
Boolean,Boolean
Yes
Not
enabled
Enable scan review of the document for the front side, back side or both. After scanning the detected document side is presented to the user for review and confirmation
enableUpload
Boolean
Yes
False
Enable manual upload of the document instead of automatic scanning. The user can choose a single PDF that contains the image of the document. For a two-side document the first picture must be the front side and the second picture the back side.
If enabled, the reading step is automatically disabled
Property
Type
Optional
Default
Description
enableReading
Boolean
Yes
false
Enable reading for the document, e.g. NFC reading of the chip
faceMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for the picture in the chip for this specific document
forceReading(value)
Boolean
Yes
false
Force the reading part. Users will not be able to skip the reading part. If the device does not support NFC and forceReading is set to true, the enrollment builder will throw and exception when you trigger SDK
forceReadingIfSupported(value)
Boolean
Yes
false
Force the reading part only if NFC is supported. Users will not be able to skip the reading part if NFC is supported. Otherwise, after the Scan user will be moved to the next step.
Note: This option has been deprecated in version 3.0.0 and is the default behaviour now
forceReadingTimeout
Int
Yes
-1 (disabled)
Defines the timeout in seconds. If the user isn't able to perform the NFC scanning of the document before the timeout expires, a message is shown accordingly, and the user is allowed to skip the NFC step.
scanMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for scanned pictures
readMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for pictures from the chip (e.g. NFC)
obfuscationType
ObfuscationType
Yes
None
Enables audit trail image background obfuscation leaving only the face visible. It can be used when there are privacy concerns related to the background of the selfie taken by the user and shared in the SDK result. There are two types of obfuscations:
FILLED: the background is entirely replaced
FILLED_WHITE: the background is entirely replaced with a wihte background
BLURRED: the background is heavily blurred, making sure the objects in the background are not clearly recognizable, but still giving a perception of the environment surrounding the user and therefore still being able to validate the reality of the image. If privacy is a concern, we recommend using this option
maxAttempts
Int
Yes
3
Set the max failed facial recognition attempts before dropping the session.
Note: only values between 1 and 3 are taken into consideration.
allowClosedEyes
bool
Yes
false
Allows to have closed eyes during facial recognition.
enableOneToNVerification
bool
Yes
False
Once activated, following a successful facial recognition (confirming liveness and matching the face), the system initiates a search for the user's selfie within your tenant. If the selfie is not found, it is added, and the indexed facial features are stored in the database. The SDK result includes a unique ID in the face object, along with an indication of whether there was a match with a previously onboarded selfie. It's essential to store this unique ID in your system alongside the user's record, facilitating future searches for users with the same ID. Please be aware that this option requires a specific permission, otherwise, it will be disregarded
isDisableConsent
Boolean
No
false
Disable consent option for the user
backgroundCheckType
Integer
No
RDC
Sets the background check type
RDC
DOW_JONES
enableMonitoring
Boolean
Yes
false
Enable continuous monitoring. See API documentation for details
skipView
Boolean
Yes
false
If enabled, the step will be skipped, and the SDK will trigger the background check without any user interaction.