Validation of Federal Driver's License - ReconoSERID/SDK-ReconoSERID-Android GitHub Wiki
Validation of Federal Driver's License
Method to validate a federal driver's license receipt for Mexican citizens, to determine by means of a QR code whether the citizen being registered is the person to whom the federal driver's license being scanned by means of the device's camera belongs.
The values returned are validation percentages that indicate if the citizen is the one who is really being identified, as well as indicating if there was an error when the service request was made.
#!java
public void onValidationFederalDriverLicense(@NotNull ValidateFederalDriverLicenseIn validateFederalDriverLicenseIn, @NotNull
OlimpiaInterface.CallbackValidationFederalDriverLicense listener)
#!Kotlin
fun onValidationFederalDriverLicense(validateFederalDriverLicenseIn : ValidateFederalDriverLicenseIn,
listener: CallbackValidationFederalDriverLicense)
Receives as parameters
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ValidateFederalDriverLicenseIn | Object | YES | Object with required parameters |
CallbackValidationFederalDriverLicense | Callback | YES | Retorn a ValidateFederalDriverLicenseOut and RespuestaTransaccion |
ValidateFederalDriverLicenseIn Parameters
Parameter | Type | Required | Description |
---|---|---|---|
formato | String | YES | Image format type (B64_PDF, B64_JPG o B64_PNG) |
guidProcesoConvenio | String | YES | Unique process identification |
idServicio | int | YES | Service ID |
image | String | YES | Biometric data Base64 |
subTipo | String | YES | Service difference |
usuario | String | YES | User storing information |
numLicencia | String | YES | License number associated with the document |
numMedPreventiva | String | YES | Number of preventive measure associated with the document |
#!java
public ValidateFederalDriverLicenseIn( String formato, //Image format type (B64_PDF, B64_JPG o B64_PNG)
String guidProcesoConvenio, //Unique citizen identification
String idServicio, //Service ID
String image, //Biometric data Base64
String subTipo, //Service difference
String usuario, //User storing information
String numLicencia,//License number associated with the document
String numMedPreventiva) //Number of preventive measure associated with the document
#!Kotlin
fun ValidateFederalDriverLicenseIn( formato : String , //Image format type (B64_PDF, B64_JPG o B64_PNG)
guidProcesoConvenio : String , //Unique citizen identification
idServicio : String , //Service ID
image : String , //Biometric data Base64
subTipo : String, //Service difference
usuario : String, //User storing information
numLicencia : String, //License number associated with the document
numMedPreventiva : String) //Number of preventive measure associated with the document
and returns the class ValidateFederalDriverLicenseOut
ValidateFederalDriverLicenseOut Parameters
Parameter | Type | Description |
---|---|---|
Card | Object | Object with required parameters |
RespuestaTransaccion | List | Transaction response |
Card Parameter
Parameter | Type | Required | Description |
---|---|---|---|
docProcess | String | YES | Data associated with the receipt to the scanned receipt |
estado | String | YES | Request status |
score | int | YES | Percentage indicating the similarity of registered citizen |
#!java
public Card(String docProcess, //Data associated with the receipt to the scanned receipt
String estado, //Request status
int score) //Percentage indicating the similarity of registered citizen
#!Kotlin
fun Card(docProcess : String, //Data associated with the receipt to the scanned receipt
estado : String, //Request status
score : int) //Percentage indicating the similarity of registered citizen
#!java
public ValidateFederalDriverLicenseOut(Card card, Trasaccion trasaccion)
#!Kotlin
fun ValidateFederalDriverLicenseOut(card : Card, trasaccion : Trasaccion)
Ex:
#!java
ValidateFederalDriverLicenseIn validateFederalDriverLicenseIn = new ValidateFederalDriverLicenseIn();
validateFederalDriverLicenseIn.setGuidProcesoConvenio(guidProcesoConvenio);
validateFederalDriverLicenseIn.setIdServicio(35);
validateFederalDriverLicenseIn.setSubTipo(7);
validateFederalDriverLicenseIn.setFormato("JPG_B64");
validateFederalDriverLicenseIn.setUsuario("[email protected]");
validateFederalDriverLicenseIn.setImage(ImageUtils.getEncodedBase64FromFilePath(stringExtra));
ServicesOlimpia.getInstance().onValidationFederalDriverLicense(validateFederalDriverLicenseIn,
new OlimpiaInterface.CallbackValidationFederalDriverLicense() {
@Override
public void onSuccess(ValidateFederalDriverLicenseOut validateFederalDriverLicenseOut) {
//
}
@Override
public void onError(RespuestaTransaccion transactionResponse) {
//
}
});
#!Kotlin
val validateFederalDriverLicenseIn = ValidateFederalDriverLicenseIn()
validateFederalDriverLicenseIn.setGuidProcesoConvenio(guidProcesoConvenio);
validateFederalDriverLicenseIn.formato = "JPG_B64"
validateFederalDriverLicenseIn.guidProcesoConvenio = guidProcesoConvenio
validateFederalDriverLicenseIn.idServicio = 35
validateFederalDriverLicenseIn.image = ImageUtils.getEncodedBase64FromFilePath(stringExtra)
validateFederalDriverLicenseIn.subTipo = 7
validateFederalDriverLicenseIn.usuario = "[email protected]"
ServicesOlimpia.getInstance()
.onValidationFederalDriverLicense(
validateFederalDriverLicenseIn,
object : OlimpiaInterface.CallbackValidationFederalDriverLicense {
override fun onSuccess(validateFederalDriverLicenseOut: ValidateFederalDriverLicenseOut?) {
//
}
override fun onError(transactionResponse: RespuestaTransaccion?) {
//
}
})
...