Request Demographic Questions - ReconoSERID/SDK-ReconoSERID-Android GitHub Wiki

Request Demographic Questions** ### Request Demographic Questions ###

Method for requesting the corresponding socio-demographic questions to a citizen for further validation.

#!java

public void requestDemographicQuestions(@NotNull String giudCitizen, @NotNull CallbackRequestQuestions listener)

Receives as parameters

Parameters

Parameter Type Required Description
GuidCitizen String SI Is the unique identifier of the citizen.
CallbackRequestQuestions Callback YES Returns a RequestDemographicQuestions and ResponseTransaction.

Receives a RequestDemographicQuestions class as a response.

Parameters TransactionResponse

Parameter Type Description
idQuestionnaire String Questionnaire ID
QuestionnaireRecord int Questionnaire record number
questions List<> List of questions and answer options with their identifiers
responseTransaction Object Transaction response
#!java

public SolicitPreguntasDemograficas(String idCuestionario, //It is the identifier of the questionnaire
                                      int questionnaireRecord, //It is the record number of the questionnaire
                                      List<Questionnaire> questions, //List of questions and answer options with their identifiers
                                      ResponseTransaction responseTransaction response) //Transaction response

Parameters questions

Parameter Type Description
idQuestion id String Question ID
questionQuestionText String Question text
optionsAnswers List Array with answer options
#!java

public Question(String idQuestion, //Is the identifier of the question
                String textoPregunta, //Text of the question 
                List<AnswerOptions>answerOptionsAnswers) //Array with answer options

Parameters optionsAnswers

Parameter Type Description
idResponse String Identifier of the response
textResponse String Text of the response
#!java

public OptionsResponse(String idResponse, //It is the identifier of the response.
                         String textoRespuesta) //Text of the response

e.g:

#!java

 ServicesOlimpia.getInstance().requestCallbackRequestQuestions(giudCitizen, new OlimpiaInterface.CallbackRequestQuestions() {
            @Override
            public void onSuccess(requestRequestDemographicQuestions requestQuestions) {
               //
            }

            @Override
            public void onError(ResponseTransaction transactionResponse) {
                //
            }
        });

return to services