Search in sources :

Example 1 with ESM_Checkbox

use of com.aware.ui.esms.ESM_Checkbox in project aware-client by denzilferreira.

the class TestESM method testESMS.

private void testESMS(Context context) {
    ESMFactory factory = new ESMFactory();
    try {
        ESM_Freetext esmFreetext = new ESM_Freetext();
        esmFreetext.setTitle("Freetext").setTrigger("test").setReplaceQueue(true).setSubmitButton("OK").setInstructions("Freetext ESM");
        ESM_Checkbox esmCheckbox = new ESM_Checkbox();
        esmCheckbox.addCheck("Check 1").addCheck("Check 2").addCheck("Other").setTitle("Checkbox").setTrigger("test").setSubmitButton("OK").setInstructions("Checkbox ESM");
        ESM_Likert esmLikert = new ESM_Likert();
        esmLikert.setLikertMax(7).setLikertMaxLabel("Great").setLikertMinLabel("Poor").setLikertStep(1).setTitle("Likert 3").setInstructions("Likert ESM").setTrigger("test").setSubmitButton("OK");
        ESM_QuickAnswer esmQuickAnswer = new ESM_QuickAnswer();
        esmQuickAnswer.addQuickAnswer("Yes").addQuickAnswer("No").setTrigger("test").setInstructions("Quick Answers ESM");
        ESM_Radio esmRadio = new ESM_Radio();
        esmRadio.addRadio("Radio 1").addRadio("Radio 2").setTitle("Radios").setInstructions("Radios ESM").setSubmitButton("OK");
        ESM_Scale esmScale = new ESM_Scale();
        esmScale.setScaleMax(100).setScaleMin(0).setScaleStart(50).setScaleMaxLabel("Perfect").setScaleMinLabel("Poor").setScaleStep(10).setTitle("Scale").setInstructions("Scale ESM").setSubmitButton("OK");
        ESM_DateTime esmDate = new ESM_DateTime();
        esmDate.setTitle("Date and Time").setTrigger("AWARE Test").setInstructions("Specify date and time").setSubmitButton("OK");
        ESM_PAM esmPAM = new ESM_PAM();
        esmPAM.setTitle("PAM").setInstructions("Pick the closest to how you feel right now.").setSubmitButton("OK").setTrigger("AWARE Test").setAppIntegration("fourtwentystudy://");
        factory.addESM(esmFreetext);
        factory.addESM(esmCheckbox);
        factory.addESM(esmLikert);
        factory.addESM(esmQuickAnswer);
        factory.addESM(esmRadio);
        factory.addESM(esmScale);
        factory.addESM(esmPAM);
        factory.addESM(esmDate);
        ESM.queueESM(context, factory.build());
    } catch (JSONException e) {
        e.printStackTrace();
    }
}
Also used : ESMFactory(com.aware.ui.esms.ESMFactory) ESM_Freetext(com.aware.ui.esms.ESM_Freetext) ESM_DateTime(com.aware.ui.esms.ESM_DateTime) ESM_QuickAnswer(com.aware.ui.esms.ESM_QuickAnswer) ESM_Scale(com.aware.ui.esms.ESM_Scale) ESM_PAM(com.aware.ui.esms.ESM_PAM) ESM_Likert(com.aware.ui.esms.ESM_Likert) JSONException(org.json.JSONException) ESM_Checkbox(com.aware.ui.esms.ESM_Checkbox) ESM_Radio(com.aware.ui.esms.ESM_Radio)

Example 2 with ESM_Checkbox

use of com.aware.ui.esms.ESM_Checkbox in project aware-client by denzilferreira.

the class TestESM method trialESMS.

private void trialESMS(Context context) {
    ESMFactory factory = new ESMFactory();
    try {
        ESM_Freetext esmFreetext = new ESM_Freetext();
        esmFreetext.setTitle("Freetext").setTrigger("test").setExpirationThreshold(0).setSubmitButton("OK").setInstructions("Freetext ESM");
        ESM_Checkbox esmCheckbox = new ESM_Checkbox();
        esmCheckbox.addCheck("Check 1").addCheck("Check 2").addCheck("Other").setTitle("Checkbox").setTrigger("test").setExpirationThreshold(0).setSubmitButton("OK").setInstructions("Checkbox ESM");
        ESM_Likert esmLikert = new ESM_Likert();
        esmLikert.setLikertMax(5).setLikertMaxLabel("Great").setLikertMinLabel("Poor").setLikertStep(1).setTitle("Likert").setInstructions("Likert ESM").setTrigger("test").setExpirationThreshold(0).setSubmitButton("OK");
        ESM_QuickAnswer esmQuickAnswer = new ESM_QuickAnswer();
        esmQuickAnswer.addQuickAnswer("Yes").addQuickAnswer("No").setTrigger("test").setExpirationThreshold(0).setSubmitButton("OK").setInstructions("Quick Answers ESM");
        ESM_Radio esmRadio = new ESM_Radio();
        esmRadio.addRadio("Radio 1").addRadio("Radio 2").setTitle("Radios").setInstructions("Radios ESM").setExpirationThreshold(0).setSubmitButton("OK");
        ESM_Scale esmScale = new ESM_Scale();
        esmScale.setScaleMax(100).setScaleMin(0).setScaleStart(50).setScaleMaxLabel("Perfect").setScaleMinLabel("Poor").setScaleStep(10).setTitle("Scale").setInstructions("Scale ESM").setExpirationThreshold(0).setSubmitButton("OK");
        factory.addESM(esmFreetext);
        factory.addESM(esmCheckbox);
        factory.addESM(esmLikert);
        factory.addESM(esmQuickAnswer);
        factory.addESM(esmRadio);
        factory.addESM(esmScale);
        ESM.queueESM(context, factory.build(), true);
    } catch (JSONException e) {
        e.printStackTrace();
    }
}
Also used : ESMFactory(com.aware.ui.esms.ESMFactory) ESM_Freetext(com.aware.ui.esms.ESM_Freetext) ESM_QuickAnswer(com.aware.ui.esms.ESM_QuickAnswer) ESM_Scale(com.aware.ui.esms.ESM_Scale) ESM_Likert(com.aware.ui.esms.ESM_Likert) JSONException(org.json.JSONException) ESM_Checkbox(com.aware.ui.esms.ESM_Checkbox) ESM_Radio(com.aware.ui.esms.ESM_Radio)

Example 3 with ESM_Checkbox

use of com.aware.ui.esms.ESM_Checkbox in project aware-client by denzilferreira.

the class TestESM method testOptionsOverflow.

private void testOptionsOverflow(Context context) {
    ESMFactory factory = new ESMFactory();
    try {
        ESM_Radio q2 = new ESM_Radio();
        q2.addRadio("1").addRadio("2").addRadio("3").addRadio("4").addRadio("5").addRadio("6").addRadio("7").addRadio("8").addRadio("9").addRadio("10").addRadio("11").addRadio("12").addRadio("13").addRadio("14").addRadio("15").addRadio("16").addRadio("17").addRadio("18").addRadio("19").setTitle("Too many options!!!").setSubmitButton("Visible?");
        ESM_Checkbox q3 = new ESM_Checkbox();
        q3.addCheck("1").addCheck("2").addCheck("3").addCheck("4").addCheck("5").addCheck("6").addCheck("7").addCheck("8").addCheck("9").addCheck("10").addCheck("11").addCheck("12").addCheck("13").addCheck("14").addCheck("15").addCheck("16").addCheck("17").addCheck("18").addCheck("19").setTitle("Too many options!!!").setSubmitButton("Visible?");
        factory.addESM(q2);
        factory.addESM(q3);
        ESM.queueESM(context, factory.build());
    } catch (JSONException e) {
        e.printStackTrace();
    }
}
Also used : ESMFactory(com.aware.ui.esms.ESMFactory) JSONException(org.json.JSONException) ESM_Checkbox(com.aware.ui.esms.ESM_Checkbox) ESM_Radio(com.aware.ui.esms.ESM_Radio)

Example 4 with ESM_Checkbox

use of com.aware.ui.esms.ESM_Checkbox in project aware-client by denzilferreira.

the class TestESM method testTimeoutQueue.

private void testTimeoutQueue(Context context) {
    ESMFactory factory = new ESMFactory();
    try {
        ESM_Freetext esmFreetext = new ESM_Freetext();
        esmFreetext.setTitle("Freetext").setTrigger("test").setExpirationThreshold(0).setNotificationTimeout(10).setSubmitButton("OK").setInstructions("Freetext ESM");
        ESM_Checkbox esmCheckbox = new ESM_Checkbox();
        esmCheckbox.addCheck("Check 1").addCheck("Check 2").addCheck("Other").setTitle("Checkbox").setTrigger("test").setExpirationThreshold(0).setNotificationTimeout(10).setSubmitButton("OK").setInstructions("Checkbox ESM");
        ESM_Likert esmLikert = new ESM_Likert();
        esmLikert.setLikertMax(5).setLikertMaxLabel("Great").setLikertMinLabel("Poor").setLikertStep(1).setTitle("Likert").setInstructions("Likert ESM").setTrigger("test").setExpirationThreshold(0).setNotificationTimeout(10).setSubmitButton("OK");
        ESM_QuickAnswer esmQuickAnswer = new ESM_QuickAnswer();
        esmQuickAnswer.addQuickAnswer("Yes").addQuickAnswer("No").setTrigger("test").setExpirationThreshold(0).setNotificationTimeout(10).setInstructions("Quick Answers ESM");
        ESM_Radio esmRadio = new ESM_Radio();
        esmRadio.addRadio("Radio 1").addRadio("Radio 2").setTitle("Radios").setInstructions("Radios ESM").setExpirationThreshold(0).setNotificationTimeout(10).setSubmitButton("OK");
        ESM_Scale esmScale = new ESM_Scale();
        esmScale.setScaleMax(100).setScaleMin(0).setScaleStart(50).setScaleMaxLabel("Perfect").setScaleMinLabel("Poor").setScaleStep(10).setTitle("Scale").setInstructions("Scale ESM").setExpirationThreshold(0).setNotificationTimeout(10).setSubmitButton("OK");
        factory.addESM(esmFreetext);
        factory.addESM(esmCheckbox);
        factory.addESM(esmLikert);
        factory.addESM(esmQuickAnswer);
        factory.addESM(esmRadio);
        factory.addESM(esmScale);
        ESM.queueESM(context, factory.build());
    } catch (JSONException e) {
        e.printStackTrace();
    }
}
Also used : ESMFactory(com.aware.ui.esms.ESMFactory) ESM_Freetext(com.aware.ui.esms.ESM_Freetext) ESM_QuickAnswer(com.aware.ui.esms.ESM_QuickAnswer) ESM_Scale(com.aware.ui.esms.ESM_Scale) ESM_Likert(com.aware.ui.esms.ESM_Likert) JSONException(org.json.JSONException) ESM_Checkbox(com.aware.ui.esms.ESM_Checkbox) ESM_Radio(com.aware.ui.esms.ESM_Radio)

Aggregations

ESMFactory (com.aware.ui.esms.ESMFactory)4 ESM_Checkbox (com.aware.ui.esms.ESM_Checkbox)4 ESM_Radio (com.aware.ui.esms.ESM_Radio)4 JSONException (org.json.JSONException)4 ESM_Freetext (com.aware.ui.esms.ESM_Freetext)3 ESM_Likert (com.aware.ui.esms.ESM_Likert)3 ESM_QuickAnswer (com.aware.ui.esms.ESM_QuickAnswer)3 ESM_Scale (com.aware.ui.esms.ESM_Scale)3 ESM_DateTime (com.aware.ui.esms.ESM_DateTime)1 ESM_PAM (com.aware.ui.esms.ESM_PAM)1