2

I am currently building an Android app using ResearchStack to conduct studies. It is the Android version of ResearchKit. Maybe someone with experience in ResearchKit can also help me. I've used the following example to adapt it to my needs. https://www.raywenderlich.com/637-researchstack-tutorial-getting-started

The following method is meanwhile deprecated.

visualStep.setNextButtonString(getString(R.string.rsb_next));

Find this line of code outcommented in the example below. If I am not using this line of code, there is no text shown in the bottom bar where you usually find a "next"-text indicating where to click to continue. Clicking the bottom right corner still causes to go to the next page.

Can anyone help me how to add a text to this? Tanks!

private List<Step> createConsentSteps(ConsentDocument document) {

    List<Step> steps = new ArrayList<>();

    for (ConsentSection section: document.getSections()) {
        ConsentVisualStep visualStep = new ConsentVisualStep(section.getType().toString());
        visualStep.setSection(section);
        //visualStep.setNextButtonString(getString(R.string.rsb_next)); //--> deprecated
        steps.add(visualStep);
    }

    ConsentDocumentStep documentStep = new ConsentDocumentStep("consent_doc");
    documentStep.setConsentHTML(document.getHtmlReviewContent());
    documentStep.setConfirmMessage(getString(R.string.rsb_consent_review_reason));

    steps.add(documentStep);

    ConsentSignature signature = document.getSignature(0);

    if (signature.requiresName()) {
        TextAnswerFormat format = new TextAnswerFormat();
        format.setIsMultipleLines(false);

        QuestionStep fullName = new QuestionStep("consent_name_step", "Please enter your full name",
                format);
        fullName.setPlaceholder("Full name");
        fullName.setOptional(false);
        steps.add(fullName);
    }

    if (signature.requiresSignatureImage()) {

        ConsentSignatureStep signatureStep = new ConsentSignatureStep("signature_step");
        signatureStep.setTitle(getString(R.string.rsb_consent_signature_title));
        signatureStep.setText(getString(R.string.rsb_consent_signature_instruction));
        signatureStep.setOptional(false);
        signatureStep.setStepLayoutClass(ConsentSignatureStepLayout.class);

        steps.add(signatureStep);
    }

    return steps;
}
Leyn
  • 21
  • 3
  • I am currently no longer working on this project, so an answer to this topic is not urgent anymore. anyways I would appreciate if somebody has a solution for this. – Leyn Feb 17 '19 at 19:47

0 Answers0