Save Document - ReconoSERID/SDK-ReconoSERID-Android GitHub Wiki

Save Document ### Save Document ###

Method to save a document (BarCode).

#!java

public void saveDocument(@NotNull SaveDocumentIn saveDocumentIn, @NotNull CallbackSaveDocument listener)

Gets as parameters SaveDocumentIn and CallbackSaveDocument

Parameters

Parameter Type Required Description
SaveSaveDocumentIn String SI Unique convention identifier
CallbackSaveDocument Callback YES Returns a BarcodeDocument and List.

Parameters SaveDocumentIn

Parameter Type Required Description
DocumentType String SI Type of document to be saved
barcode String SI Text string with the barcode information of the document to be saved.
#!java

public SaveDocumentIn(String DocumentType, //Type of document to save
                          String barcode) //Text string with the barcode information of the document to save.

and returns a BarcodeDocument

Parameters TransactionResponse

Parameter Type Description
DocumentNumber String Unique document number.
firstLastName String The first surname of the person.
secondLastName String The second last name of the person.
firstName String The first name of the person.
middleFirstName String Is the person's middle name.
sex String Sex of the person.
dateBirth String Date of birth of the person.
rH String RH of the person.
transactionResponse Object Response of the transaction.
#!java

public BarcodeDocument(String numeroDocumento, //Is the unique document number.
                       String firstLastName, //It is the first last name of the person.
                       String secondLastName, //It is the second last name of the person.
                       String firstName, //Es the person's first name.
                       String middleName, //It is the second name of the person.
                       String sex, //Sex of the person
                       String fechaNacimiento, //Date of birth of the person.
                       String rH, //RH of the person.
                       ResponseTransaction responseTransaction response) //Transaction response

e.g.

#!java

SaveDocumentIn saveDocumentIn = new SaveDocumentIn("", "");

        ServicesOlimpia.getInstance().saveDocument(saveDocumentIn, new OlimpiaInterface.CallbackSaveDocument() {
            @Override
            public void onSuccess(BarcodeDocument barcodeDocument) {
                //
            }

            @Override
            public void onError(List<ErrorEntransaction> transactionResponse) {
                //
            }
        });

return to services