Migration 2.25.x to 2.26.x version
This document is intended to highlight the main changes from the previous 2.25.x version and the 2.26.x version. Please read it thoroughly to address any deprecated methods introduced in this new version.
Deprecated methods
MobbScanScanResultData::getImage
The function public Bitmap getImage(String scanId, MobbScanImageType imageType)
whitin the MobbScanScanResultData
class has been deprecated since v2.26.0. This function now returns null
. To obtain different images from a flow, please refer to the following guide carefully:
Document image
To acquire the document image, you can utilize the detection listener, IDDocumentDetectionListener
interface:
public interface IDDocumentDetectionListener {
/**
* @param result Indicates if the detection succeed or there was an error.
* @param resultData Data object returned as result of scan operation when document is detected.
* @param error Informed only if result was an error, to indicate the actual error occurred.
*/
void onIDDocumentDetected(MobbScanDetectionResult result,
MobbScanDetectionResultData resultData, MobbScanAPIError error);
}
This callback provides the MobbScanDetectionResultData
class, which contains a reference to a Bitmap
. This Bitmap
holds a front or back image of a detected document.
You can implement this listener whitin different methods:
MobbScanAPI.getInstance().detectDocument(documentSide, /* here */);
MobbScanAPI.getInstance().scanDocument(side, scanId, /* here */, scanListener);
Face now image
If your flow includes a face validation step, you can retreive the selfie image from a detected face. To obtain this selfie image, you can use the FaceAcquisitorListener
:
/**
* This listener will let you get the captures images of the face of the user right before
* performing the biometric matching.
*/
public interface FaceAcquisitorListener {
/**
* Invoked as soon as the image(s) of the face of user have been acquired
*
* @param result code indicating if the operation has been successful or there has been any
* problem
* @param data contains the images of the user if there were no problems on the capturing
* process
* @param error error with the details of what went wrong if the operation had a problem.
*/
void onFaceAcquired(MobbScanFaceAcquisitorResult result, MobbScanFaceAcquisitorData data,
MobbScanAPIError error);
}
This listener provides a MobbScanFaceAcquisitorData
class, which contains an array of the detected face images.
Face document image
If your flow includes a liveness step, you can retreive both the selfie image and the face document image. The obtain these images, use the MobbScanValidationVideoResultData
class from ValidationCheckListener
.
MobbScanValidationVideoResultData
contains references to two Bitmap
. You can utilize these functions:
public Bitmap getImageFaceNow()
, to acquire the face now / selfie image.public Bitmap getImageFaceDocument()
, to acquire the face document image.