Validate Biometrics - ReconoSERID/SDK-ReconoSERID-Android GitHub Wiki
Validate Biometrics
Method that validates the authenticity of a biometric vs. the one that is stored in the database. stored in the database.
#!java
public void validateBiometry(@NotNull ValidateBiometryIn validateBiometryIn, @NotNull CallbackValidateBiometry listener)
Received as parameters
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ValidateBiometryIn | Object | SI | Data to be sent |
CallbackValidateBiometry | Callback | YES | Returns a ValidateBiometry and ResponseTransaction |
Parameters ValidateBiometryIn
Parameter | Type | Required | Description |
---|---|---|---|
guidCiudadano | String | SI | Unique identifier of the citizen |
idService | Integer | SI | Id associated to the type of biometrics to validate |
subType | String | SI | SubType associated to the type of biometrics to be validated |
biometrics | String | SI | String in BASE64 containing the image to send |
format | String | SI | Type of format of the image to be sent (JPG_B64 or PNG_B64) |
#!java
public ValidarBiometriaIn(String guiCiudadano, //Is the citizen's unique identifier
int idService, //Identifier of the service for the required biometrics
String biometria, //Is the biometrics in base_64
String format) //It is the format in which the biometrics is in.
And returns a ValidarBiometria
Parameters ValidarBiometria
Parameter | Type | Description |
---|---|---|
isValid | boolean | Is the acceptance or not of the validation. |
score | String | The maximum score according to the validation. |
attempts | Integer | Number of attempts made by the user |
ResponseTransaction | Object |
#!java
public ValidarBiometria(boolean esValido, //It is the acceptance or not of the validation.
String score, //It is the maximum score according to the validation.
ResponseTransaction responseTransaction response) //Transaction response
e.g:
#!java
ValidarBiometriaIn data = new ValidarBiometriaIn();
data.setGuiCitizen(GuiCitizen);
data.setFormat("JPG_B64");
data.setIdService(5);
data.setBiometria(ImageUtils.convert64String(pathFace));
ServicesOlimpia.getInstance().validateBiometry(data, new OlimpiaInterface.CallbackValidateBiometry() {
@Override
public void onSuccess(ValidateBiometry validateBiometry) {
//
}
@Override
public void onError(TransactionResponse transactionResponse) {
//
}
});